Back to home page

OSCL-LXR

 
 

    


0001 #ifndef LLC_IF_H
0002 #define LLC_IF_H
0003 /*
0004  * Copyright (c) 1997 by Procom Technology,Inc.
0005  *       2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
0006  *
0007  * This program can be redistributed or modified under the terms of the
0008  * GNU General Public License as published by the Free Software Foundation.
0009  * This program is distributed without any warranty or implied warranty
0010  * of merchantability or fitness for a particular purpose.
0011  *
0012  * See the GNU General Public License for more details.
0013  */
0014 /* Defines LLC interface to network layer */
0015 /* Available primitives */
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 /* Not supported at this time */
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 /* Primitive type */
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 /* Reset reasons, remote entity or local LLC */
0046 #define LLC_RESET_REASON_REMOTE 1
0047 #define LLC_RESET_REASON_LOCAL  2
0048 
0049 /* Disconnect reasons */
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 /* Confirm reasons */
0055 #define LLC_STATUS_CONN     0 /* connect confirm & reset confirm */
0056 #define LLC_STATUS_DISC     1 /* connect confirm & reset confirm */
0057 #define LLC_STATUS_FAILED   2 /* connect confirm & reset confirm */
0058 #define LLC_STATUS_IMPOSSIBLE   3 /* connect confirm */
0059 #define LLC_STATUS_RECEIVED 4 /* data conn */
0060 #define LLC_STATUS_REMOTE_BUSY  5 /* data conn */
0061 #define LLC_STATUS_REFUSE   6 /* data conn */
0062 #define LLC_STATUS_CONFLICT 7 /* disconnect conn */
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 /* LLC_IF_H */