Пример #1
0
void kaodv_netlink_send_debug_msg(char *buf, int len)
{
	struct sk_buff *skb = NULL;

	skb = kaodv_netlink_build_msg(KAODVM_DEBUG, buf, len);

	if (skb == NULL) {
		printk("kaodv_netlink: skb=NULL\n");
		return;
	}

	netlink_broadcast(kaodvnl, skb, peer_pid, AODVGRP_NOTIFY, GFP_USER);
}
Пример #2
0
void kaodv_netlink_send_rt_msg(int type, __u32 src, __u32 dest)
{
	struct sk_buff *skb = NULL;
	struct kaodv_rt_msg m;

	memset(&m, 0, sizeof(m));

	m.src = src;
	m.dst = dest;

	skb = kaodv_netlink_build_msg(type, &m, sizeof(struct kaodv_rt_msg));

	if (skb == NULL) {
		printk("kaodv_netlink: skb=NULL\n");
		return;
	}

/* 	netlink_unicast(kaodvnl, skb, peer_pid, MSG_DONTWAIT); */
	netlink_broadcast(kaodvnl, skb, 0, AODVGRP_NOTIFY, GFP_USER);
}
Пример #3
0
void kaodv_netlink_send_rerr_msg(int type, __u32 src, __u32 dest, int ifindex)
{
	struct sk_buff *skb = NULL;
	struct kaodv_rt_msg m;

	memset(&m, 0, sizeof(m));

	m.type = type;
	m.src = src;
	m.dst = dest;
	m.ifindex = ifindex;

	skb = kaodv_netlink_build_msg(KAODVM_SEND_RERR, &m,
				      sizeof(struct kaodv_rt_msg));

	if (skb == NULL) {
		printk("kaodv_netlink: skb=NULL\n");
		return;
	}
	/* status = netlink_unicast(kaodvnl, skb, peer_pid, MSG_DONTWAIT); */
	netlink_broadcast(kaodvnl, skb, 0, AODVGRP_NOTIFY, GFP_USER);
}