diff options
| author | Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 2002-09-23 21:04:25 -0300 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2002-09-23 21:04:25 -0300 |
| commit | 71d24cc6cccf45edd7e95619d429f9270a6a0d2f (patch) | |
| tree | a750280c1ed7bcf2ac9886e72bde03591eadc8df /include/net | |
| parent | 1502caff56fc7377f7556098c6917f8506055d2c (diff) | |
[LLC] kill sap->{ind,conf}, finally!
With this one the sap->ind and ->conf callbacks are gone, now the core
is tightly integrated with the socket layer (PF_LLC) and the
datalink_protos are mostly working like when the old LLC stack was
in the kernel, i.e. without special receiving routines for IPX in
802.2 mode, now I have to work on the UI sending routines to kill more
stupid structs.
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/llc_c_ev.h | 5 | ||||
| -rw-r--r-- | include/net/llc_conn.h | 3 | ||||
| -rw-r--r-- | include/net/llc_if.h | 38 | ||||
| -rw-r--r-- | include/net/llc_main.h | 1 | ||||
| -rw-r--r-- | include/net/llc_s_ev.h | 1 | ||||
| -rw-r--r-- | include/net/llc_sap.h | 11 | ||||
| -rw-r--r-- | include/net/p8022.h | 9 |
7 files changed, 36 insertions, 32 deletions
diff --git a/include/net/llc_c_ev.h b/include/net/llc_c_ev.h index 2a8a0be9040b..6d729ed755f1 100644 --- a/include/net/llc_c_ev.h +++ b/include/net/llc_c_ev.h @@ -138,9 +138,8 @@ struct llc_conn_state_ev { u8 type; u8 reason; u8 status; - u8 flag; - struct llc_prim_if_block *ind_prim; - struct llc_prim_if_block *cfm_prim; + u8 ind_prim; + u8 cfm_prim; union llc_conn_ev_if data; }; diff --git a/include/net/llc_conn.h b/include/net/llc_conn.h index ac0a2bb7aa22..a272c8dd8d36 100644 --- a/include/net/llc_conn.h +++ b/include/net/llc_conn.h @@ -100,6 +100,9 @@ extern struct sock *llc_lookup_established(struct llc_sap *sap, struct llc_addr *laddr); extern struct sock *llc_lookup_listener(struct llc_sap *sap, struct llc_addr *laddr); +extern struct sock *llc_lookup_dgram(struct llc_sap *sap, + struct llc_addr *laddr); +extern void llc_save_primitive(struct sk_buff* skb, u8 prim); extern u8 llc_data_accept_state(u8 state); extern void llc_build_offset_table(void); #endif /* LLC_CONN_H */ diff --git a/include/net/llc_if.h b/include/net/llc_if.h index 5ae7edc13649..fcf4f2541f7a 100644 --- a/include/net/llc_if.h +++ b/include/net/llc_if.h @@ -17,17 +17,17 @@ #include <linux/if_arp.h> #include <linux/llc.h> -#define LLC_DATAUNIT_PRIM 0 -#define LLC_CONN_PRIM 1 -#define LLC_DATA_PRIM 2 -#define LLC_DISC_PRIM 3 -#define LLC_RESET_PRIM 4 -#define LLC_FLOWCONTROL_PRIM 5 /* Not supported at this time */ -#define LLC_DISABLE_PRIM 6 -#define LLC_XID_PRIM 7 -#define LLC_TEST_PRIM 8 -#define LLC_SAP_ACTIVATION 9 -#define LLC_SAP_DEACTIVATION 10 +#define LLC_DATAUNIT_PRIM 1 +#define LLC_CONN_PRIM 2 +#define LLC_DATA_PRIM 3 +#define LLC_DISC_PRIM 4 +#define LLC_RESET_PRIM 5 +#define LLC_FLOWCONTROL_PRIM 6 /* Not supported at this time */ +#define LLC_DISABLE_PRIM 7 +#define LLC_XID_PRIM 8 +#define LLC_TEST_PRIM 9 +#define LLC_SAP_ACTIVATION 10 +#define LLC_SAP_DEACTIVATION 11 #define LLC_NBR_PRIMITIVES 11 @@ -110,23 +110,21 @@ struct llc_prim_if_block { u8 prim; union llc_u_prim_data *data; }; -typedef int (*llc_prim_call_t)(struct llc_prim_if_block *prim_if); -extern struct llc_sap *llc_sap_open(llc_prim_call_t network_indicate, - llc_prim_call_t network_confirm, u8 lsap); +extern struct llc_sap *llc_sap_open(u8 lsap, + int (*func)(struct sk_buff *skb, + struct net_device *dev, + struct packet_type *pt)); extern void llc_sap_close(struct llc_sap *sap); extern int llc_establish_connection(struct sock *sk, u8 *lmac, u8 *dmac, u8 dsap); extern int llc_build_and_send_pkt(struct sock *sk, struct sk_buff *skb); -extern void llc_build_and_send_ui_pkt(struct llc_sap *sap, - struct sk_buff *skb, +extern void llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb, u8 *dmac, u8 dsap); -extern void llc_build_and_send_xid_pkt(struct llc_sap *sap, - struct sk_buff *skb, +extern void llc_build_and_send_xid_pkt(struct llc_sap *sap, struct sk_buff *skb, u8 *dmac, u8 dsap); -extern void llc_build_and_send_test_pkt(struct llc_sap *sap, - struct sk_buff *skb, +extern void llc_build_and_send_test_pkt(struct llc_sap *sap, struct sk_buff *skb, u8 *dmac, u8 dsap); extern int llc_send_disc(struct sock *sk); #endif /* LLC_IF_H */ diff --git a/include/net/llc_main.h b/include/net/llc_main.h index 25d486278da4..61b679128163 100644 --- a/include/net/llc_main.h +++ b/include/net/llc_main.h @@ -64,4 +64,5 @@ extern void llc_station_state_process(struct llc_station *station, extern void llc_station_send_pdu(struct llc_station *station, struct sk_buff *skb); extern struct sk_buff *llc_alloc_frame(void); +extern struct packet_type llc_packet_type; #endif /* LLC_MAIN_H */ diff --git a/include/net/llc_s_ev.h b/include/net/llc_s_ev.h index 530042ae2be4..7014414e318c 100644 --- a/include/net/llc_s_ev.h +++ b/include/net/llc_s_ev.h @@ -60,6 +60,7 @@ union llc_sap_ev_if { struct llc_prim_if_block; struct llc_sap_state_ev { + u8 primitive; u8 type; u8 reason; u8 ind_cfm_flag; diff --git a/include/net/llc_sap.h b/include/net/llc_sap.h index 412798ab6c0e..5d9dc00a5b36 100644 --- a/include/net/llc_sap.h +++ b/include/net/llc_sap.h @@ -12,6 +12,7 @@ * See the GNU General Public License for more details. */ #include <linux/skbuff.h> +#include <net/llc_if.h> /** * struct llc_sap - Defines the SAP component * @@ -29,10 +30,9 @@ struct llc_sap { u8 state; u8 p_bit; u8 f_bit; - llc_prim_call_t ind; - llc_prim_call_t conf; - struct llc_prim_if_block llc_ind_prim, llc_cfm_prim; - union llc_u_prim_data llc_ind_data_prim, llc_cfm_data_prim; + int (*rcv_func)(struct sk_buff *skb, + struct net_device *dev, + struct packet_type *pt); struct llc_addr laddr; struct list_head node; struct { @@ -45,7 +45,8 @@ struct llc_sap_state_ev; extern void llc_sap_assign_sock(struct llc_sap *sap, struct sock *sk); extern void llc_sap_unassign_sock(struct llc_sap *sap, struct sock *sk); -extern void llc_sap_state_process(struct llc_sap *sap, struct sk_buff *skb); +extern void llc_sap_state_process(struct llc_sap *sap, struct sk_buff *skb, + struct packet_type *pt); extern void llc_sap_rtn_pdu(struct llc_sap *sap, struct sk_buff *skb); extern void llc_sap_send_pdu(struct llc_sap *sap, struct sk_buff *skb); #endif /* LLC_SAP_H */ diff --git a/include/net/p8022.h b/include/net/p8022.h index 443932810d46..3c99a86c3581 100644 --- a/include/net/p8022.h +++ b/include/net/p8022.h @@ -1,9 +1,10 @@ #ifndef _NET_P8022_H #define _NET_P8022_H -#include <net/llc_if.h> - -extern struct datalink_proto *register_8022_client(unsigned char type, - int (*indicate)(struct llc_prim_if_block *prim)); +extern struct datalink_proto * + register_8022_client(unsigned char type, + int (*func)(struct sk_buff *skb, + struct net_device *dev, + struct packet_type *pt)); extern void unregister_8022_client(struct datalink_proto *proto); #endif |
