patch-2.1.30 linux/include/net/netbeui.h

Next file: linux/include/net/netlink.h
Previous file: linux/include/net/neighbour.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.29/linux/include/net/netbeui.h linux/include/net/netbeui.h
@@ -5,6 +5,9 @@
 #ifndef __NET_NETBEUI_H
 #define __NET_NETBEUI_H
 
+
+#define NB_NAME_LEN	16
+
 /*
  *	Used to keep lists of netbeui sessions
  */
@@ -51,12 +54,15 @@
 #define NB_NAME_COLLIDE		2	/* Name collided - we failed */
 #define NB_OURS			3	/* We own the name	*/
 #define NB_NAME_OTHER		4	/* Name found - owned by other */
+#define NB_NAME_GET		5	/* Trying to allocate a name */
+#define NB_STATE		7	/* State bits */
+#define NB_NAME_GROUP		8	/* Group name bit */
 	int ours;			/* We own this name */
 	int users;			/* Number of nb_ses's to this name */
 	struct timer_list	timer;	/* Our timer */
 	int timer_mode;			/* Timer mode */
 #define NB_TIMER_ACQUIRE	1	/* Expiry means we got our name */
-#define NB_TIMER_COLLIDE	2	/* Expire a collded record */
+#define NB_TIMER_COLLIDE	2	/* Expire a collided record */
 #define NB_TIMER_DROP		3	/* Drop a learned record */	
 };
 
@@ -78,5 +84,67 @@
 extern struct nb_name *netbeui_lookup_name(char *name);
 extern int nb_delete_name(struct nb_name *name);
 
+/*
+ *	NetBEUI Protocol items
+ */
+
+#define ADD_GROUP_NAME_QUERY	0x00
+#define ADD_NAME_QUERY		0x01
+#define NAME_IN_CONFLICT	0x02
+#define STATUS_QUERY		0x03
+#define TERMINATE_TRACE		0x07
+#define DATAGRAM		0x08
+#define DATAGRAM_BROADCAST	0x09
+#define NAME_QUERY		0x0A
+#define ADD_NAME_RESPONSE	0x0D
+#define NAME_RECOGNIZED		0x0E
+#define STATUS_RESPONSE		0x0F
+#define TERMINATE_TRACE2	0x13
+#define DATA_ACK		0x14
+#define DATA_FIRST_MIDDLE	0x15
+#define DATA_ONLY_LAST		0x16
+#define SESSION_CONFIRM		0x17
+#define SESSION_END		0x18
+#define SESSION_INITIALIZE	0x19
+#define NO_RECEIVE		0x1A
+#define RECEIVE_OUTSTANDING	0x1B
+#define RECEIVE_CONTINUE	0x1C
+#define SESSION_ALIVE		0x1F
+
+#define NB_TRANSMIT_COUNT	6
+#define NB_TRANSMIT_TIMEOUT	(HZ/2)
+
+#define NB_DESCRIM_1		0xEF
+#define NB_DESCRIM_2		0xFF
+
+struct nb_dgram_pkt
+{
+	__u16	length;
+	__u8	descrim1;
+	__u8	descrim2;
+	__u8	command;
+	__u8	option1;
+	__u16	option2;
+	__u16	tx_seq;
+	__u16	rx_seq;
+	__u8	dest[NB_NAME_LEN];
+	__u8	src[NB_NAME_LEN];
+};
+
+struct nb_sess_pkt
+{
+	__u16	length;
+	__u8	descrim1;
+	__u8	descrim2;
+	__u8	command;
+	__u8	option1;
+	__u16	option2;
+	__u16	tx_seq;
+	__u16	rx_seq;
+	__u8	dnum;
+	__u8	snum;
+};
+
+#define NO_SEQ	0
 
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov