diff options
| author | Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 2002-09-13 04:48:47 -0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 2002-09-13 04:48:47 -0300 |
| commit | 96b2cae773183e8298385cf05103b3abeb3cfa7e (patch) | |
| tree | 31ab1b23c199777eea261535596ccd1d532b5f9b /include/net | |
| parent | f3fd7056647b5f8c68a8b74d302e680d8c81d1ea (diff) | |
[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.
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/llc_if.h | 23 | ||||
| -rw-r--r-- | include/net/llc_sap.h | 1 |
2 files changed, 23 insertions, 1 deletions
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 <linux/if.h> +#include <linux/if_arp.h> +#include <linux/llc.h> #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; |
