#ifndef LLC_PDU_H
#define LLC_PDU_H
#include <linux/if_ether.h>
#define LLC_PDU_LEN_I …
#define LLC_PDU_LEN_S …
#define LLC_PDU_LEN_U …
#define LLC_PDU_LEN_U_XID …
#define LLC_GLOBAL_SAP …
#define LLC_NULL_SAP …
#define LLC_MGMT_INDIV …
#define LLC_MGMT_GRP …
#define LLC_RDE_SAP …
#define LLC_ISO_RESERVED_SAP …
#define LLC_SAP_GROUP_DSAP …
#define LLC_SAP_RESP_SSAP …
#define LLC_PDU_GROUP_DSAP_MASK …
#define LLC_PDU_IS_GROUP_DSAP(pdu) …
#define LLC_PDU_IS_INDIV_DSAP(pdu) …
#define LLC_PDU_CMD_RSP_MASK …
#define LLC_PDU_CMD …
#define LLC_PDU_RSP …
#define LLC_PDU_IS_CMD(pdu) …
#define LLC_PDU_IS_RSP(pdu) …
#define LLC_PDU_TYPE_I_MASK …
#define LLC_PDU_TYPE_S_MASK …
#define LLC_PDU_TYPE_U_MASK …
#define LLC_PDU_TYPE_MASK …
#define LLC_PDU_TYPE_I …
#define LLC_PDU_TYPE_S …
#define LLC_PDU_TYPE_U …
#define LLC_PDU_TYPE_U_XID …
#define LLC_PDU_TYPE_IS_I(pdu) …
#define LLC_PDU_TYPE_IS_U(pdu) …
#define LLC_PDU_TYPE_IS_S(pdu) …
#define LLC_U_PF_BIT_MASK …
#define LLC_U_PF_IS_1(pdu) …
#define LLC_U_PF_IS_0(pdu) …
#define LLC_U_PDU_CMD_MASK …
#define LLC_U_PDU_CMD(pdu) …
#define LLC_U_PDU_RSP(pdu) …
#define LLC_1_PDU_CMD_UI …
#define LLC_1_PDU_CMD_XID …
#define LLC_1_PDU_CMD_TEST …
#define LLC_2_PDU_CMD_SABME …
#define LLC_2_PDU_CMD_DISC …
#define LLC_2_PDU_RSP_UA …
#define LLC_2_PDU_RSP_DM …
#define LLC_2_PDU_RSP_FRMR …
#define LLC_XID_FMT_ID …
#define LLC_XID_CLASS_ZEROS_MASK …
#define LLC_XID_CLASS_MASK …
#define LLC_XID_NULL_CLASS_1 …
#define LLC_XID_NULL_CLASS_2 …
#define LLC_XID_NULL_CLASS_3 …
#define LLC_XID_NULL_CLASS_4 …
#define LLC_XID_NNULL_TYPE_1 …
#define LLC_XID_NNULL_TYPE_2 …
#define LLC_XID_NNULL_TYPE_3 …
#define LLC_XID_NNULL_TYPE_1_2 …
#define LLC_XID_NNULL_TYPE_1_3 …
#define LLC_XID_NNULL_TYPE_2_3 …
#define LLC_XID_NNULL_ALL …
#define LLC_XID_RW_MASK …
#define LLC_XID_MIN_RW …
#define LLC_2_SEQ_NBR_MODULO …
#define LLC_I_GET_NS(pdu) …
#define LLC_I_GET_NR(pdu) …
#define LLC_I_PF_BIT_MASK …
#define LLC_I_PF_IS_0(pdu) …
#define LLC_I_PF_IS_1(pdu) …
#define LLC_S_PDU_CMD_MASK …
#define LLC_S_PDU_CMD(pdu) …
#define LLC_S_PDU_RSP(pdu) …
#define LLC_2_PDU_CMD_RR …
#define LLC_2_PDU_RSP_RR …
#define LLC_2_PDU_CMD_REJ …
#define LLC_2_PDU_RSP_REJ …
#define LLC_2_PDU_CMD_RNR …
#define LLC_2_PDU_RSP_RNR …
#define LLC_S_PF_BIT_MASK …
#define LLC_S_PF_IS_0(pdu) …
#define LLC_S_PF_IS_1(pdu) …
#define PDU_SUPV_GET_Nr(pdu) …
#define PDU_GET_NEXT_Vr(sn) …
#define FRMR_INFO_LENGTH …
#define FRMR_INFO_SET_REJ_CNTRL(info,rej_ctrl) …
#define FRMR_INFO_SET_Vs(info,vs) …
#define FRMR_INFO_SET_Vr(info,vr) …
#define FRMR_INFO_SET_C_R_BIT(info, cr) …
#define FRMR_INFO_SET_INVALID_PDU_CTRL_IND(info, ind) …
#define FRMR_INFO_SET_INVALID_PDU_INFO_IND(info, ind) …
#define FRMR_INFO_SET_PDU_INFO_2LONG_IND(info, ind) …
#define FRMR_INFO_SET_PDU_INVALID_Nr_IND(info, ind) …
#define FRMR_INFO_SET_PDU_INVALID_Ns_IND(info, ind) …
struct llc_pdu_sn { … } __packed;
static inline struct llc_pdu_sn *llc_pdu_sn_hdr(struct sk_buff *skb)
{ … }
struct llc_pdu_un { … } __packed;
static inline struct llc_pdu_un *llc_pdu_un_hdr(struct sk_buff *skb)
{ … }
static inline void llc_pdu_header_init(struct sk_buff *skb, u8 type,
u8 ssap, u8 dsap, u8 cr)
{ … }
static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa)
{ … }
static inline void llc_pdu_decode_da(struct sk_buff *skb, u8 *da)
{ … }
static inline void llc_pdu_decode_ssap(struct sk_buff *skb, u8 *ssap)
{ … }
static inline void llc_pdu_decode_dsap(struct sk_buff *skb, u8 *dsap)
{ … }
static inline void llc_pdu_init_as_ui_cmd(struct sk_buff *skb)
{ … }
static inline void llc_pdu_init_as_test_cmd(struct sk_buff *skb)
{ … }
static inline void llc_pdu_init_as_test_rsp(struct sk_buff *skb,
struct sk_buff *ev_skb)
{ … }
struct llc_xid_info { … } __packed;
static inline void llc_pdu_init_as_xid_cmd(struct sk_buff *skb,
u8 svcs_supported, u8 rx_window)
{ … }
static inline void llc_pdu_init_as_xid_rsp(struct sk_buff *skb,
u8 svcs_supported, u8 rx_window)
{ … }
struct llc_frmr_info { … } __packed;
void llc_pdu_set_cmd_rsp(struct sk_buff *skb, u8 type);
void llc_pdu_set_pf_bit(struct sk_buff *skb, u8 bit_value);
void llc_pdu_decode_pf_bit(struct sk_buff *skb, u8 *pf_bit);
void llc_pdu_init_as_disc_cmd(struct sk_buff *skb, u8 p_bit);
void llc_pdu_init_as_i_cmd(struct sk_buff *skb, u8 p_bit, u8 ns, u8 nr);
void llc_pdu_init_as_rej_cmd(struct sk_buff *skb, u8 p_bit, u8 nr);
void llc_pdu_init_as_rnr_cmd(struct sk_buff *skb, u8 p_bit, u8 nr);
void llc_pdu_init_as_rr_cmd(struct sk_buff *skb, u8 p_bit, u8 nr);
void llc_pdu_init_as_sabme_cmd(struct sk_buff *skb, u8 p_bit);
void llc_pdu_init_as_dm_rsp(struct sk_buff *skb, u8 f_bit);
void llc_pdu_init_as_frmr_rsp(struct sk_buff *skb, struct llc_pdu_sn *prev_pdu,
u8 f_bit, u8 vs, u8 vr, u8 vzyxw);
void llc_pdu_init_as_rr_rsp(struct sk_buff *skb, u8 f_bit, u8 nr);
void llc_pdu_init_as_rej_rsp(struct sk_buff *skb, u8 f_bit, u8 nr);
void llc_pdu_init_as_rnr_rsp(struct sk_buff *skb, u8 f_bit, u8 nr);
void llc_pdu_init_as_ua_rsp(struct sk_buff *skb, u8 f_bit);
#endif