0001 #ifndef LLC_IF_H
0002 #define LLC_IF_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include <linux/if.h>
0017 #include <linux/if_arp.h>
0018 #include <linux/llc.h>
0019 #include <linux/etherdevice.h>
0020 #include <net/llc.h>
0021
0022 #define LLC_DATAUNIT_PRIM 1
0023 #define LLC_CONN_PRIM 2
0024 #define LLC_DATA_PRIM 3
0025 #define LLC_DISC_PRIM 4
0026 #define LLC_RESET_PRIM 5
0027 #define LLC_FLOWCONTROL_PRIM 6
0028 #define LLC_DISABLE_PRIM 7
0029 #define LLC_XID_PRIM 8
0030 #define LLC_TEST_PRIM 9
0031 #define LLC_SAP_ACTIVATION 10
0032 #define LLC_SAP_DEACTIVATION 11
0033
0034 #define LLC_NBR_PRIMITIVES 11
0035
0036 #define LLC_IND 1
0037 #define LLC_CONFIRM 2
0038
0039
0040 #define LLC_PRIM_TYPE_REQ 1
0041 #define LLC_PRIM_TYPE_IND 2
0042 #define LLC_PRIM_TYPE_RESP 3
0043 #define LLC_PRIM_TYPE_CONFIRM 4
0044
0045
0046 #define LLC_RESET_REASON_REMOTE 1
0047 #define LLC_RESET_REASON_LOCAL 2
0048
0049
0050 #define LLC_DISC_REASON_RX_DM_RSP_PDU 0
0051 #define LLC_DISC_REASON_RX_DISC_CMD_PDU 1
0052 #define LLC_DISC_REASON_ACK_TMR_EXP 2
0053
0054
0055 #define LLC_STATUS_CONN 0
0056 #define LLC_STATUS_DISC 1
0057 #define LLC_STATUS_FAILED 2
0058 #define LLC_STATUS_IMPOSSIBLE 3
0059 #define LLC_STATUS_RECEIVED 4
0060 #define LLC_STATUS_REMOTE_BUSY 5
0061 #define LLC_STATUS_REFUSE 6
0062 #define LLC_STATUS_CONFLICT 7
0063 #define LLC_STATUS_RESET_DONE 8
0064
0065 int llc_establish_connection(struct sock *sk, const u8 *lmac, u8 *dmac,
0066 u8 dsap);
0067 int llc_build_and_send_pkt(struct sock *sk, struct sk_buff *skb);
0068 int llc_send_disc(struct sock *sk);
0069 #endif