llc.h
01: #ifndef __LINUX_LLC_H
02: #define __LINUX_LLC_H
03:
04:
05:
06: <jschlst@samba.org>
07:
08:
09:
10:
11:
12:
13:
14:
15:
16: #include <linux/socket.h>
17:
18: #define __LLC_SOCK_SIZE__ 16
19: struct sockaddr_llc {
20: __kernel_sa_family_t sllc_family;
21: __kernel_sa_family_t sllc_arphrd;
22: unsigned char sllc_test;
23: unsigned char sllc_xid;
24: unsigned char sllc_ua;
25: unsigned char sllc_sap;
26: unsigned char sllc_mac[IFHWADDRLEN];
27: unsigned char __pad[__LLC_SOCK_SIZE__ -
28: sizeof(__kernel_sa_family_t) * 2 -
29: sizeof(unsigned char) * 4 - IFHWADDRLEN];
30: };
31:
32:
33: enum llc_sockopts {
34: LLC_OPT_UNKNOWN = 0,
35: LLC_OPT_RETRY,
36: LLC_OPT_SIZE,
37: LLC_OPT_ACK_TMR_EXP,
38: LLC_OPT_P_TMR_EXP,
39: LLC_OPT_REJ_TMR_EXP,
40: LLC_OPT_BUSY_TMR_EXP,
41: LLC_OPT_TX_WIN,
42: LLC_OPT_RX_WIN,
43: LLC_OPT_PKTINFO,
44: LLC_OPT_MAX
45: };
46:
47: #define LLC_OPT_MAX_RETRY 100
48: #define LLC_OPT_MAX_SIZE 4196
49: #define LLC_OPT_MAX_WIN 127
50: #define LLC_OPT_MAX_ACK_TMR_EXP 60
51: #define LLC_OPT_MAX_P_TMR_EXP 60
52: #define LLC_OPT_MAX_REJ_TMR_EXP 60
53: #define LLC_OPT_MAX_BUSY_TMR_EXP 60
54:
55:
56: #define LLC_SAP_NULL 0x00
57: #define LLC_SAP_LLC 0x02
58: #define LLC_SAP_SNA 0x04
59: #define LLC_SAP_PNM 0x0E
60: #define LLC_SAP_IP 0x06
61: #define LLC_SAP_BSPAN 0x42
62: #define LLC_SAP_MMS 0x4E
63: #define LLC_SAP_8208 0x7E
64: #define LLC_SAP_3COM 0x80
65: #define LLC_SAP_PRO 0x8E
66: #define LLC_SAP_SNAP 0xAA
67: #define LLC_SAP_BANYAN 0xBC
68: #define LLC_SAP_IPX 0xE0
69: #define LLC_SAP_NETBEUI 0xF0
70: #define LLC_SAP_LANMGR 0xF4
71: #define LLC_SAP_IMPL 0xF8
72: #define LLC_SAP_DISC 0xFC
73: #define LLC_SAP_OSI 0xFE
74: #define LLC_SAP_LAR 0xDC
75: #define LLC_SAP_RM 0xD4
76: #define LLC_SAP_GLOBAL 0xFF
77:
78: struct llc_pktinfo {
79: int lpi_ifindex;
80: unsigned char lpi_sap;
81: unsigned char lpi_mac[IFHWADDRLEN];
82: };
83:
84: #endif
85:
© Andrew Scott 2006 -
2025,
All Rights Reserved