Lines Matching refs:skb
204 static inline struct llc_pdu_sn *llc_pdu_sn_hdr(struct sk_buff *skb) in llc_pdu_sn_hdr() argument
206 return (struct llc_pdu_sn *)skb_network_header(skb); in llc_pdu_sn_hdr()
216 static inline struct llc_pdu_un *llc_pdu_un_hdr(struct sk_buff *skb) in llc_pdu_un_hdr() argument
218 return (struct llc_pdu_un *)skb_network_header(skb); in llc_pdu_un_hdr()
231 static inline void llc_pdu_header_init(struct sk_buff *skb, u8 type, in llc_pdu_header_init() argument
237 skb_push(skb, hlen); in llc_pdu_header_init()
238 skb_reset_network_header(skb); in llc_pdu_header_init()
239 pdu = llc_pdu_un_hdr(skb); in llc_pdu_header_init()
252 static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa) in llc_pdu_decode_sa() argument
254 if (skb->protocol == htons(ETH_P_802_2)) in llc_pdu_decode_sa()
255 memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN); in llc_pdu_decode_sa()
256 else if (skb->protocol == htons(ETH_P_TR_802_2)) { in llc_pdu_decode_sa()
257 memcpy(sa, tr_hdr(skb)->saddr, ETH_ALEN); in llc_pdu_decode_sa()
269 static inline void llc_pdu_decode_da(struct sk_buff *skb, u8 *da) in llc_pdu_decode_da() argument
271 if (skb->protocol == htons(ETH_P_802_2)) in llc_pdu_decode_da()
272 memcpy(da, eth_hdr(skb)->h_dest, ETH_ALEN); in llc_pdu_decode_da()
273 else if (skb->protocol == htons(ETH_P_TR_802_2)) in llc_pdu_decode_da()
274 memcpy(da, tr_hdr(skb)->daddr, ETH_ALEN); in llc_pdu_decode_da()
285 static inline void llc_pdu_decode_ssap(struct sk_buff *skb, u8 *ssap) in llc_pdu_decode_ssap() argument
287 *ssap = llc_pdu_un_hdr(skb)->ssap & 0xFE; in llc_pdu_decode_ssap()
298 static inline void llc_pdu_decode_dsap(struct sk_buff *skb, u8 *dsap) in llc_pdu_decode_dsap() argument
300 *dsap = llc_pdu_un_hdr(skb)->dsap & 0xFE; in llc_pdu_decode_dsap()
309 static inline void llc_pdu_init_as_ui_cmd(struct sk_buff *skb) in llc_pdu_init_as_ui_cmd() argument
311 struct llc_pdu_un *pdu = llc_pdu_un_hdr(skb); in llc_pdu_init_as_ui_cmd()
323 static inline void llc_pdu_init_as_test_cmd(struct sk_buff *skb) in llc_pdu_init_as_test_cmd() argument
325 struct llc_pdu_un *pdu = llc_pdu_un_hdr(skb); in llc_pdu_init_as_test_cmd()
339 static inline void llc_pdu_init_as_test_rsp(struct sk_buff *skb, in llc_pdu_init_as_test_rsp() argument
342 struct llc_pdu_un *pdu = llc_pdu_un_hdr(skb); in llc_pdu_init_as_test_rsp()
353 skb_put(skb, dsize); in llc_pdu_init_as_test_rsp()
371 static inline void llc_pdu_init_as_xid_cmd(struct sk_buff *skb, in llc_pdu_init_as_xid_cmd() argument
375 struct llc_pdu_un *pdu = llc_pdu_un_hdr(skb); in llc_pdu_init_as_xid_cmd()
384 skb_put(skb, sizeof(struct llc_xid_info)); in llc_pdu_init_as_xid_cmd()
395 static inline void llc_pdu_init_as_xid_rsp(struct sk_buff *skb, in llc_pdu_init_as_xid_rsp() argument
399 struct llc_pdu_un *pdu = llc_pdu_un_hdr(skb); in llc_pdu_init_as_xid_rsp()
409 skb_put(skb, sizeof(struct llc_xid_info)); in llc_pdu_init_as_xid_rsp()
420 extern void llc_pdu_set_cmd_rsp(struct sk_buff *skb, u8 type);
421 extern void llc_pdu_set_pf_bit(struct sk_buff *skb, u8 bit_value);
422 extern void llc_pdu_decode_pf_bit(struct sk_buff *skb, u8 *pf_bit);
423 extern void llc_pdu_init_as_disc_cmd(struct sk_buff *skb, u8 p_bit);
424 extern void llc_pdu_init_as_i_cmd(struct sk_buff *skb, u8 p_bit, u8 ns, u8 nr);
425 extern void llc_pdu_init_as_rej_cmd(struct sk_buff *skb, u8 p_bit, u8 nr);
426 extern void llc_pdu_init_as_rnr_cmd(struct sk_buff *skb, u8 p_bit, u8 nr);
427 extern void llc_pdu_init_as_rr_cmd(struct sk_buff *skb, u8 p_bit, u8 nr);
428 extern void llc_pdu_init_as_sabme_cmd(struct sk_buff *skb, u8 p_bit);
429 extern void llc_pdu_init_as_dm_rsp(struct sk_buff *skb, u8 f_bit);
430 extern void llc_pdu_init_as_frmr_rsp(struct sk_buff *skb,
433 extern void llc_pdu_init_as_rr_rsp(struct sk_buff *skb, u8 f_bit, u8 nr);
434 extern void llc_pdu_init_as_rej_rsp(struct sk_buff *skb, u8 f_bit, u8 nr);
435 extern void llc_pdu_init_as_rnr_rsp(struct sk_buff *skb, u8 f_bit, u8 nr);
436 extern void llc_pdu_init_as_ua_rsp(struct sk_buff *skb, u8 f_bit);