diff options
| author | Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 2002-09-23 23:19:47 -0300 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2002-09-23 23:19:47 -0300 |
| commit | 9950c8fea9d3fed4a4a97d12b5988d97ee12c6b0 (patch) | |
| tree | d472ebe78213938e91a050c69e67361c97fd06e6 /include | |
| parent | 71d24cc6cccf45edd7e95619d429f9270a6a0d2f (diff) | |
[LLC] clean up the ui sending routines and core
OK, now I managed to kill the last remnants of bloated structs from
LLC, I feel better now :)
Also deleted include/net/llc_{frame,name,state}.h, remnants of the
old LLC stack still in the tree.
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/llc_c_ev.h | 37 | ||||
| -rw-r--r-- | include/net/llc_conn.h | 6 | ||||
| -rw-r--r-- | include/net/llc_evnt.h | 24 | ||||
| -rw-r--r-- | include/net/llc_frame.h | 98 | ||||
| -rw-r--r-- | include/net/llc_if.h | 42 | ||||
| -rw-r--r-- | include/net/llc_name.h | 7 | ||||
| -rw-r--r-- | include/net/llc_s_ev.h | 38 | ||||
| -rw-r--r-- | include/net/llc_state.h | 4 |
8 files changed, 19 insertions, 237 deletions
diff --git a/include/net/llc_c_ev.h b/include/net/llc_c_ev.h index 6d729ed755f1..20fbfeec34c4 100644 --- a/include/net/llc_c_ev.h +++ b/include/net/llc_c_ev.h @@ -110,37 +110,14 @@ #define LLC_CONN_EV_QFY_S_FLAG_EQ_0 11 #define LLC_CONN_EV_QFY_INIT_P_F_CYCLE 12 -/* Event data interface; what is sent in an event package */ -/* Event LLC_CONN_EV_TYPE_SIMPLE interface */ -struct llc_conn_ev_simple_if { - u8 ev; -}; - -/* Event LLC_CONN_EV_TYPE_PRIM interface */ -struct llc_conn_ev_prim_if { - u8 prim; /* connect, disconnect, reset, ... */ - u8 type; /* request, indicate, response, conf */ - struct llc_prim_if_block *data; -}; - -/* Event LLC_CONN_EV_TYPE_PDU interface */ -struct llc_conn_ev_pdu_if { - u8 ev; -}; - -union llc_conn_ev_if { - struct llc_conn_ev_simple_if a; /* 'a' for simple, easy ... */ - struct llc_conn_ev_prim_if prim; - struct llc_conn_ev_pdu_if pdu; -}; - struct llc_conn_state_ev { - u8 type; - u8 reason; - u8 status; - u8 ind_prim; - u8 cfm_prim; - union llc_conn_ev_if data; + u8 type; + u8 prim; + u8 prim_type; + u8 reason; + u8 status; + u8 ind_prim; + u8 cfm_prim; }; static __inline__ struct llc_conn_state_ev *llc_conn_ev(struct sk_buff *skb) diff --git a/include/net/llc_conn.h b/include/net/llc_conn.h index a272c8dd8d36..ec993d032078 100644 --- a/include/net/llc_conn.h +++ b/include/net/llc_conn.h @@ -66,12 +66,6 @@ struct llc_opt { u32 rx_pdu_hdr; /* used for saving header of last pdu received and caused sending FRMR. Used for resending FRMR */ -#ifdef DEBUG_LLC_CONN_ALLOC - char *f_alloc, /* function that allocated this connection */ - *f_free; /* function that freed this connection */ - int l_alloc, /* line that allocated this connection */ - l_free; /* line that freed this connection */ -#endif }; #define llc_sk(__sk) ((struct llc_opt *)(__sk)->protinfo) diff --git a/include/net/llc_evnt.h b/include/net/llc_evnt.h index 82bca6d937d6..429adcb480e3 100644 --- a/include/net/llc_evnt.h +++ b/include/net/llc_evnt.h @@ -31,26 +31,12 @@ #define LLC_STATION_EV_RX_NULL_DSAP_TEST_C 8 #define LLC_STATION_EV_DISABLE_REQ 9 -/* Interfaces for various types of supported events */ -struct llc_stat_ev_simple_if { - u8 ev; -}; - -struct llc_stat_ev_prim_if { - u8 prim; /* connect, disconnect, reset, ... */ - u8 type; /* request, indicate, response, confirm */ -}; - -union llc_stat_ev_if { - struct llc_stat_ev_simple_if a; /* 'a' for simple, easy ... */ - struct llc_stat_ev_prim_if prim; -}; - struct llc_station_state_ev { - u8 type; - u8 reason; - union llc_stat_ev_if data; - struct list_head node; /* node in station->ev_q.list */ + u8 type; + u8 prim; + u8 prim_type; + u8 reason; + struct list_head node; /* node in station->ev_q.list */ }; static __inline__ struct llc_station_state_ev * diff --git a/include/net/llc_frame.h b/include/net/llc_frame.h deleted file mode 100644 index e8fb198d19a8..000000000000 --- a/include/net/llc_frame.h +++ /dev/null @@ -1,98 +0,0 @@ -/* if_ether.h needed for definition of ETH_DATA_LEN and ETH_ALEN - */ -#include "linux/if_ether.h" - -/* frame layout based on par3.2 "LLC PDU format" - */ -typedef union { /* pdu layout from pages 40 & 44 */ - struct { /* general header, all pdu types */ - unsigned dsap : 8; /* dest service access point */ - unsigned ssap : 8; /* source service access point */ - unsigned f1 : 1; /* I- U- or S- format id bits */ - unsigned f2 : 1; - unsigned : 6; - unsigned : 8; - } pdu_hdr; - struct { - char dummy1[2]; /* dsap + ssap */ - char byte1; - char byte2; - } pdu_cntl; /* unformatted control bytes */ - struct { /* header of an Information pdu */ - unsigned char dummy2[2]; - unsigned : 1; - unsigned ns : 7; - unsigned i_pflag : 1; /* poll/final bit */ - unsigned nr : 7; /* N(R) */ - unsigned char is_info[ ETH_DATA_LEN ]; - } i_hdr; - struct { /* header of a Supervisory pdu */ - unsigned char dummy3[2]; - unsigned : 2; - unsigned ss : 2; /* supervisory function bits */ - unsigned : 4; - unsigned s_pflag : 1; /* poll/final bit */ - unsigned nr : 7; /* N(R) */ - } s_hdr; - -/* when accessing the P/F bit or the N(R) field there's no need to distinguish - I pdus from S pdus i_pflag and s_pflag / i_nr and s_nr map to the same - physical location. - */ - struct { /* header of an Unnumbered pdu */ - unsigned char dummy4[2]; - unsigned : 2; - unsigned mm1 : 2; /* modifier function part1 */ - unsigned u_pflag : 1; /* P/F for U- pdus */ - unsigned mm2 : 3; /* modifier function part2 */ - unsigned char u_info[ ETH_DATA_LEN-1]; - } u_hdr; - struct { /* mm field in an Unnumbered pdu */ - unsigned char dummy5[2]; - unsigned : 2; - unsigned mm : 6; /* must be masked to get ridd of P/F ! */ - } u_mm; - -} frame_type, *frameptr; - -/* frame format test macros: */ - -#define IS_UFRAME( fr ) ( ( (fr)->pdu_hdr.f1) & ( (fr)->pdu_hdr.f2) ) - -#define IS_IFRAME( fr ) ( !( (fr)->pdu_hdr.f1) ) - -#define IS_SFRAME( fr ) ( ( (fr)->pdu_hdr.f1) & !( (fr)->pdu_hdr.f2) ) - -#define IS_RSP( fr ) ( fr->pdu_hdr.ssap & 0x01 ) - - -/* The transition table, the _encode tables and some tests in the - source code depend on the numeric order of these values. - Think twice before changing. - */ - -/* frame names for TYPE 2 operation: */ -#define I_CMD 0 -#define RR_CMD 1 -#define RNR_CMD 2 -#define REJ_CMD 3 -#define DISC_CMD 4 -#define SABME_CMD 5 -#define I_RSP 6 -#define RR_RSP 7 -#define RNR_RSP 8 -#define REJ_RSP 9 -#define UA_RSP 10 -#define DM_RSP 11 -#define FRMR_RSP 12 - -/* junk frame name: */ -#define BAD_FRAME 13 -#define NO_FRAME 13 - -/* frame names for TYPE 1 operation: */ -#define UI_CMD 14 -#define XID_CMD 15 -#define TEST_CMD 16 -#define XID_RSP 17 -#define TEST_RSP 18 diff --git a/include/net/llc_if.h b/include/net/llc_if.h index fcf4f2541f7a..a72591707e20 100644 --- a/include/net/llc_if.h +++ b/include/net/llc_if.h @@ -67,50 +67,8 @@ struct llc_addr { u8 mac[IFHWADDRLEN]; }; -struct llc_prim_reset { - struct sock *sk; - u16 link; -}; - - /* Sending data in conection-less mode */ -struct llc_prim_unit_data { - struct llc_addr saddr; - struct llc_addr daddr; - u8 pri; - struct sk_buff *skb; /* pointer to frame */ - u8 lfb; /* largest frame bit (TR) */ -}; - -struct llc_prim_xid { - struct llc_addr saddr; - struct llc_addr daddr; - u8 pri; - struct sk_buff *skb; -}; - -struct llc_prim_test { - struct llc_addr saddr; - struct llc_addr daddr; - u8 pri; - struct sk_buff *skb; /* pointer to frame */ -}; - -union llc_u_prim_data { - struct llc_prim_reset res; - struct llc_prim_unit_data udata; /* unit data */ - struct llc_prim_xid xid; - struct llc_prim_test test; -}; - struct llc_sap; -/* Information block passed with all called primitives */ -struct llc_prim_if_block { - struct llc_sap *sap; - u8 prim; - union llc_u_prim_data *data; -}; - extern struct llc_sap *llc_sap_open(u8 lsap, int (*func)(struct sk_buff *skb, struct net_device *dev, diff --git a/include/net/llc_name.h b/include/net/llc_name.h deleted file mode 100644 index 72128719f7cc..000000000000 --- a/include/net/llc_name.h +++ /dev/null @@ -1,7 +0,0 @@ -char *frame_names[] = - {"I_CMD","RR_CMD","RNR_CMD","REJ_CMD","DISC_CMD", - "SABME_CMD","I_RSP","RR_RSP","RNR_RSP","REJ_RSP", - "UA_RSP","DM_RSP","FRMR_RSP","BAD_FRAME","UI_CMD", - "XID_CMD","TEST_CMD","XID_RSP","TEST_RSP" -}; - diff --git a/include/net/llc_s_ev.h b/include/net/llc_s_ev.h index 7014414e318c..e3acb9329e4a 100644 --- a/include/net/llc_s_ev.h +++ b/include/net/llc_s_ev.h @@ -34,38 +34,14 @@ #define LLC_SAP_EV_RX_TEST_R 9 #define LLC_SAP_EV_DEACTIVATION_REQ 10 -/* Interfaces for various types of supported events */ -struct llc_sap_ev_simple_if { - u8 ev; -}; - -struct llc_prim_if_block; - -struct llc_sap_ev_prim_if { - u8 prim; /* connect, disconnect, reset, ... */ - u8 type; /* request, indicate, response, conf */ - struct llc_prim_if_block *data; -}; - -struct llc_sap_ev_pdu_if { - u8 ev; -}; - -union llc_sap_ev_if { - struct llc_sap_ev_simple_if a; /* 'a' for simple, easy ... */ - struct llc_sap_ev_prim_if prim; - struct llc_sap_ev_pdu_if pdu; -}; - -struct llc_prim_if_block; - struct llc_sap_state_ev { - u8 primitive; - u8 type; - u8 reason; - u8 ind_cfm_flag; - struct llc_prim_if_block *prim; - union llc_sap_ev_if data; + u8 prim; + u8 prim_type; + u8 type; + u8 reason; + u8 ind_cfm_flag; + struct llc_addr saddr; + struct llc_addr daddr; }; static __inline__ struct llc_sap_state_ev *llc_sap_ev(struct sk_buff *skb) diff --git a/include/net/llc_state.h b/include/net/llc_state.h deleted file mode 100644 index bb18e9bd1ac8..000000000000 --- a/include/net/llc_state.h +++ /dev/null @@ -1,4 +0,0 @@ -char *state_names[] = { - "ADM","CONN","RESET_WAIT","RESET_CHECK","SETUP", - "RESET","D_CONN","ERROR","NORMAL" -}; |
