#include <linux/kernel.h>
#include <linux/timer.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/rtnetlink.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <net/mrp.h>
#include <asm/unaligned.h>
static unsigned int mrp_join_time __read_mostly = …;
module_param(mrp_join_time, uint, 0644);
MODULE_PARM_DESC(…) …;
static unsigned int mrp_periodic_time __read_mostly = …;
module_param(mrp_periodic_time, uint, 0644);
MODULE_PARM_DESC(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
static const u8
mrp_applicant_state_table[MRP_APPLICANT_MAX + 1][MRP_EVENT_MAX + 1] = …;
static const u8
mrp_tx_action_table[MRP_APPLICANT_MAX + 1] = …;
static void mrp_attrvalue_inc(void *value, u8 len)
{ … }
static int mrp_attr_cmp(const struct mrp_attr *attr,
const void *value, u8 len, u8 type)
{ … }
static struct mrp_attr *mrp_attr_lookup(const struct mrp_applicant *app,
const void *value, u8 len, u8 type)
{ … }
static struct mrp_attr *mrp_attr_create(struct mrp_applicant *app,
const void *value, u8 len, u8 type)
{ … }
static void mrp_attr_destroy(struct mrp_applicant *app, struct mrp_attr *attr)
{ … }
static void mrp_attr_destroy_all(struct mrp_applicant *app)
{ … }
static int mrp_pdu_init(struct mrp_applicant *app)
{ … }
static int mrp_pdu_append_end_mark(struct mrp_applicant *app)
{ … }
static void mrp_pdu_queue(struct mrp_applicant *app)
{ … }
static void mrp_queue_xmit(struct mrp_applicant *app)
{ … }
static int mrp_pdu_append_msg_hdr(struct mrp_applicant *app,
u8 attrtype, u8 attrlen)
{ … }
static int mrp_pdu_append_vecattr_hdr(struct mrp_applicant *app,
const void *firstattrvalue, u8 attrlen)
{ … }
static int mrp_pdu_append_vecattr_event(struct mrp_applicant *app,
const struct mrp_attr *attr,
enum mrp_vecattr_event vaevent)
{ … }
static void mrp_attr_event(struct mrp_applicant *app,
struct mrp_attr *attr, enum mrp_event event)
{ … }
int mrp_request_join(const struct net_device *dev,
const struct mrp_application *appl,
const void *value, u8 len, u8 type)
{ … }
EXPORT_SYMBOL_GPL(…);
void mrp_request_leave(const struct net_device *dev,
const struct mrp_application *appl,
const void *value, u8 len, u8 type)
{ … }
EXPORT_SYMBOL_GPL(…);
static void mrp_mad_event(struct mrp_applicant *app, enum mrp_event event)
{ … }
static void mrp_join_timer_arm(struct mrp_applicant *app)
{ … }
static void mrp_join_timer(struct timer_list *t)
{ … }
static void mrp_periodic_timer_arm(struct mrp_applicant *app)
{ … }
static void mrp_periodic_timer(struct timer_list *t)
{ … }
static int mrp_pdu_parse_end_mark(struct sk_buff *skb, int *offset)
{ … }
static void mrp_pdu_parse_vecattr_event(struct mrp_applicant *app,
struct sk_buff *skb,
enum mrp_vecattr_event vaevent)
{ … }
static int mrp_pdu_parse_vecattr(struct mrp_applicant *app,
struct sk_buff *skb, int *offset)
{ … }
static int mrp_pdu_parse_msg(struct mrp_applicant *app, struct sk_buff *skb,
int *offset)
{ … }
static int mrp_rcv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *pt, struct net_device *orig_dev)
{ … }
static int mrp_init_port(struct net_device *dev)
{ … }
static void mrp_release_port(struct net_device *dev)
{ … }
int mrp_init_applicant(struct net_device *dev, struct mrp_application *appl)
{ … }
EXPORT_SYMBOL_GPL(…);
void mrp_uninit_applicant(struct net_device *dev, struct mrp_application *appl)
{ … }
EXPORT_SYMBOL_GPL(…);
int mrp_register_application(struct mrp_application *appl)
{ … }
EXPORT_SYMBOL_GPL(…);
void mrp_unregister_application(struct mrp_application *appl)
{ … }
EXPORT_SYMBOL_GPL(…);