26 #include <linux/kernel.h>
27 #include <linux/if_arp.h>
28 #include <linux/netdevice.h>
33 #include <linux/export.h>
58 pr_err(
"%s: received non-long source address!\n", __func__);
100 goto nla_put_failure;
124 goto nla_put_failure;
128 goto nla_put_failure;
132 goto nla_put_failure;
135 goto nla_put_failure;
159 goto nla_put_failure;
169 u16 panid,
u16 coord_addr)
185 goto nla_put_failure;
216 goto nla_put_failure;
240 goto nla_put_failure;
249 static int ieee802154_nl_fill_iface(
struct sk_buff *
msg,
u32 portid,
274 goto nla_put_failure;
276 return genlmsg_end(msg, hdr);
280 genlmsg_cancel(msg, hdr);
312 static int ieee802154_associate_req(
struct sk_buff *
skb,
327 dev = ieee802154_nl_get_dev(info);
338 addr.short_addr = nla_get_u16(
357 static int ieee802154_associate_resp(
struct sk_buff *skb,
369 dev = ieee802154_nl_get_dev(info);
387 static int ieee802154_disassociate_req(
struct sk_buff *skb,
399 dev = ieee802154_nl_get_dev(info);
410 addr.short_addr = nla_get_u16(
427 static int ieee802154_start_req(
struct sk_buff *skb,
struct genl_info *info)
434 int pan_coord, blx, coord_realign;
448 dev = ieee802154_nl_get_dev(info);
453 addr.short_addr = nla_get_u16(
477 bcn_ord, sf_ord, pan_coord, blx, coord_realign);
497 dev = ieee802154_nl_get_dev(info);
518 static int ieee802154_list_iface(
struct sk_buff *skb,
529 dev = ieee802154_nl_get_dev(info);
544 return genlmsg_reply(msg, info);
553 static int ieee802154_dump_iface(
struct sk_buff *skb,
556 struct net *
net = sock_net(skb->
sk);
559 int s_idx = cb->
args[0];
568 if (ieee802154_nl_fill_iface(skb,
NETLINK_CB(cb->
skb).portid,
579 static struct genl_ops ieee802154_coordinator_ops[] = {
586 ieee802154_dump_iface),
598 &ieee802154_coord_mcgrp);
603 &ieee802154_beacon_mcgrp);
607 for (i = 0; i <
ARRAY_SIZE(ieee802154_coordinator_ops); i++) {
609 &ieee802154_coordinator_ops[i]);