More cleaning ...
[linux-2.6/linux-mips.git] / include / net / llc_main.h
blob0e0d39742a2e25a89f26f599611624e9b4643ab0
1 #ifndef LLC_MAIN_H
2 #define LLC_MAIN_H
3 /*
4 * Copyright (c) 1997 by Procom Technology, Inc.
5 * 2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
7 * This program can be redistributed or modified under the terms of the
8 * GNU General Public License as published by the Free Software Foundation.
9 * This program is distributed without any warranty or implied warranty
10 * of merchantability or fitness for a particular purpose.
12 * See the GNU General Public License for more details.
14 #define LLC_EVENT 1
15 #define LLC_PACKET 2
16 #define LLC_TYPE_1 1
17 #define LLC_TYPE_2 2
18 #define LLC_P_TIME 2
19 #define LLC_ACK_TIME 1
20 #define LLC_REJ_TIME 3
21 #define LLC_BUSY_TIME 3
22 #define LLC_DEST_INVALID 0 /* Invalid LLC PDU type */
23 #define LLC_DEST_SAP 1 /* Type 1 goes here */
24 #define LLC_DEST_CONN 2 /* Type 2 goes here */
26 /**
27 * struct llc_station - LLC station component
29 * SAP and connection resource manager, one per adapter.
31 * @state - state of station
32 * @xid_r_count - XID response PDU counter
33 * @mac_sa - MAC source address
34 * @sap_list - list of related SAPs
35 * @ev_q - events entering state mach.
36 * @mac_pdu_q - PDUs ready to send to MAC
38 struct llc_station {
39 u8 state;
40 u8 xid_r_count;
41 struct timer_list ack_timer;
42 u8 retry_count;
43 u8 maximum_retry;
44 u8 mac_sa[6];
45 struct {
46 rwlock_t lock;
47 struct list_head list;
48 } sap_list;
49 struct {
50 struct sk_buff_head list;
51 spinlock_t lock;
52 } ev_q;
53 struct sk_buff_head mac_pdu_q;
56 extern struct llc_sap *llc_sap_alloc(void);
57 extern void llc_sap_save(struct llc_sap *sap);
58 extern void llc_free_sap(struct llc_sap *sap);
59 extern struct llc_sap *llc_sap_find(u8 lsap);
60 extern void llc_station_state_process(struct llc_station *station,
61 struct sk_buff *skb);
62 extern void llc_station_send_pdu(struct llc_station *station,
63 struct sk_buff *skb);
64 extern struct sk_buff *llc_alloc_frame(void);
66 extern struct llc_station llc_main_station;
67 #endif /* LLC_MAIN_H */