From 96b2cae773183e8298385cf05103b3abeb3cfa7e Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 13 Sep 2002 04:48:47 -0300 Subject: [LLC] kill sap->req() Intermediate patch for the PF_LLC SOCK_DGRAM prim clean-up, now PF_LLC is prims in the sending side, now to hack the core to not use prims to send to PF_LLC. This also fixes a skb leak on llc_sap_state_process. --- include/net/llc_if.h | 23 +++++++++++++++++++++++ include/net/llc_sap.h | 1 - 2 files changed, 23 insertions(+), 1 deletion(-) (limited to 'include/net') diff --git a/include/net/llc_if.h b/include/net/llc_if.h index ebff514725e3..e17373a17c00 100644 --- a/include/net/llc_if.h +++ b/include/net/llc_if.h @@ -14,6 +14,8 @@ /* Defines LLC interface to network layer */ /* Available primitives */ #include +#include +#include #define LLC_DATAUNIT_PRIM 0 #define LLC_CONN_PRIM 1 @@ -118,5 +120,26 @@ 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, + struct sockaddr_llc *addr); +extern void llc_build_and_send_xid_pkt(struct llc_sap *sap, + struct sk_buff *skb, + struct sockaddr_llc *addr); +extern void llc_build_and_send_test_pkt(struct llc_sap *sap, + struct sk_buff *skb, + struct sockaddr_llc *addr); extern int llc_send_disc(struct sock *sk); + +/** + * llc_proto_type - return eth protocol for ARP header type + * @arphrd: ARP header type. + * + * Given an ARP header type return the corresponding ethernet protocol. + */ +static __inline__ u16 llc_proto_type(u16 arphrd) +{ + return arphrd == ARPHRD_IEEE802_TR ? + htons(ETH_P_TR_802_2) : htons(ETH_P_802_2); +} #endif /* LLC_IF_H */ diff --git a/include/net/llc_sap.h b/include/net/llc_sap.h index 3132bebd1422..1357da860c04 100644 --- a/include/net/llc_sap.h +++ b/include/net/llc_sap.h @@ -30,7 +30,6 @@ struct llc_sap { u8 state; u8 p_bit; u8 f_bit; - llc_prim_call_t req; llc_prim_call_t ind; llc_prim_call_t conf; struct llc_prim_if_block llc_ind_prim, llc_cfm_prim; -- cgit v1.2.3