4 #define MRP_END_MARK 0x0
15 struct mrp_vecattr_hdr {
17 unsigned char firstattrvalue[];
18 #define MRP_VECATTR_HDR_LEN_MASK cpu_to_be16(0x1FFF)
19 #define MRP_VECATTR_HDR_FLAG_LA cpu_to_be16(0x2000)
22 enum mrp_vecattr_event {
23 MRP_VECATTR_EVENT_NEW,
24 MRP_VECATTR_EVENT_JOIN_IN,
26 MRP_VECATTR_EVENT_JOIN_MT,
29 __MRP_VECATTR_EVENT_MAX
33 struct mrp_msg_hdr *mh;
34 struct mrp_vecattr_hdr *vah;
35 unsigned char attrvalue[];
38 static inline struct mrp_skb_cb *mrp_cb(struct sk_buff *skb)
40 BUILD_BUG_ON(sizeof(struct mrp_skb_cb) >
41 FIELD_SIZEOF(struct sk_buff, cb));
42 return (struct mrp_skb_cb *)skb->cb;
45 enum mrp_applicant_state {
46 MRP_APPLICANT_INVALID,
60 #define MRP_APPLICANT_MAX (__MRP_APPLICANT_MAX - 1)
78 #define MRP_EVENT_MAX (__MRP_EVENT_MAX - 1)
83 MRP_TX_ACTION_S_JOIN_IN,
84 MRP_TX_ACTION_S_JOIN_IN_OPTIONAL,
85 MRP_TX_ACTION_S_IN_OPTIONAL,
91 enum mrp_applicant_state state;
94 unsigned char value[];
97 enum mrp_applications {
101 #define MRP_APPLICATION_MAX (__MRP_APPLICATION_MAX - 1)
103 struct mrp_application {
104 enum mrp_applications type;
105 unsigned int maxattr;
106 struct packet_type pkttype;
107 unsigned char group_address[ETH_ALEN];
111 struct mrp_applicant {
112 struct mrp_application *app;
113 struct net_device *dev;
114 struct timer_list join_timer;
117 struct sk_buff_head queue;
124 struct mrp_applicant __rcu *applicants[MRP_APPLICATION_MAX + 1];
128 extern int mrp_register_application(struct mrp_application *app);
129 extern void mrp_unregister_application(struct mrp_application *app);
131 extern int mrp_init_applicant(struct net_device *dev,
132 struct mrp_application *app);
133 extern void mrp_uninit_applicant(struct net_device *dev,
134 struct mrp_application *app);
136 extern int mrp_request_join(const struct net_device *dev,
137 const struct mrp_application *app,
138 const void *value, u8 len, u8 type);
139 extern void mrp_request_leave(const struct net_device *dev,
140 const struct mrp_application *app,
141 const void *value, u8 len, u8 type);
143 #endif /* _NET_MRP_H */