printk removal, receive reordering bugfix
[cor_2_6_31.git] / include / linux / llc.h
blob7733585603f12894b95120b91bd7d9178919f1a7
1 #ifndef __LINUX_LLC_H
2 #define __LINUX_LLC_H
3 /*
4 * IEEE 802.2 User Interface SAPs for Linux, data structures and indicators.
6 * Copyright (c) 2001 by Jay Schulist <jschlst@samba.org>
8 * This program can be redistributed or modified under the terms of the
9 * GNU General Public License as published by the Free Software Foundation.
10 * This program is distributed without any warranty or implied warranty
11 * of merchantability or fitness for a particular purpose.
13 * See the GNU General Public License for more details.
15 #define __LLC_SOCK_SIZE__ 16 /* sizeof(sockaddr_llc), word align. */
16 struct sockaddr_llc {
17 sa_family_t sllc_family; /* AF_LLC */
18 sa_family_t sllc_arphrd; /* ARPHRD_ETHER */
19 unsigned char sllc_test;
20 unsigned char sllc_xid;
21 unsigned char sllc_ua; /* UA data, only for SOCK_STREAM. */
22 unsigned char sllc_sap;
23 unsigned char sllc_mac[IFHWADDRLEN];
24 unsigned char __pad[__LLC_SOCK_SIZE__ - sizeof(sa_family_t) * 2 -
25 sizeof(unsigned char) * 4 - IFHWADDRLEN];
28 /* sockopt definitions. */
29 enum llc_sockopts {
30 LLC_OPT_UNKNOWN = 0,
31 LLC_OPT_RETRY, /* max retrans attempts. */
32 LLC_OPT_SIZE, /* max PDU size (octets). */
33 LLC_OPT_ACK_TMR_EXP, /* ack expire time (secs). */
34 LLC_OPT_P_TMR_EXP, /* pf cycle expire time (secs). */
35 LLC_OPT_REJ_TMR_EXP, /* rej sent expire time (secs). */
36 LLC_OPT_BUSY_TMR_EXP, /* busy state expire time (secs). */
37 LLC_OPT_TX_WIN, /* tx window size. */
38 LLC_OPT_RX_WIN, /* rx window size. */
39 LLC_OPT_MAX
42 #define LLC_OPT_MAX_RETRY 100
43 #define LLC_OPT_MAX_SIZE 4196
44 #define LLC_OPT_MAX_WIN 127
45 #define LLC_OPT_MAX_ACK_TMR_EXP 60
46 #define LLC_OPT_MAX_P_TMR_EXP 60
47 #define LLC_OPT_MAX_REJ_TMR_EXP 60
48 #define LLC_OPT_MAX_BUSY_TMR_EXP 60
50 /* LLC SAP types. */
51 #define LLC_SAP_NULL 0x00 /* NULL SAP. */
52 #define LLC_SAP_LLC 0x02 /* LLC Sublayer Management. */
53 #define LLC_SAP_SNA 0x04 /* SNA Path Control. */
54 #define LLC_SAP_PNM 0x0E /* Proway Network Management. */
55 #define LLC_SAP_IP 0x06 /* TCP/IP. */
56 #define LLC_SAP_BSPAN 0x42 /* Bridge Spanning Tree Proto */
57 #define LLC_SAP_MMS 0x4E /* Manufacturing Message Srv. */
58 #define LLC_SAP_8208 0x7E /* ISO 8208 */
59 #define LLC_SAP_3COM 0x80 /* 3COM. */
60 #define LLC_SAP_PRO 0x8E /* Proway Active Station List */
61 #define LLC_SAP_SNAP 0xAA /* SNAP. */
62 #define LLC_SAP_BANYAN 0xBC /* Banyan. */
63 #define LLC_SAP_IPX 0xE0 /* IPX/SPX. */
64 #define LLC_SAP_NETBEUI 0xF0 /* NetBEUI. */
65 #define LLC_SAP_LANMGR 0xF4 /* LanManager. */
66 #define LLC_SAP_IMPL 0xF8 /* IMPL */
67 #define LLC_SAP_DISC 0xFC /* Discovery */
68 #define LLC_SAP_OSI 0xFE /* OSI Network Layers. */
69 #define LLC_SAP_LAR 0xDC /* LAN Address Resolution */
70 #define LLC_SAP_RM 0xD4 /* Resource Management */
71 #define LLC_SAP_GLOBAL 0xFF /* Global SAP. */
73 #ifdef __KERNEL__
74 #define LLC_SAP_DYN_START 0xC0
75 #define LLC_SAP_DYN_STOP 0xDE
76 #define LLC_SAP_DYN_TRIES 4
78 #define llc_ui_skb_cb(__skb) ((struct sockaddr_llc *)&((__skb)->cb[0]))
79 #endif /* __KERNEL__ */
80 #endif /* __LINUX_LLC_H */