^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Copyright (C) 2007, 2008, 2009 Siemens AG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #ifndef IEEE_802154_LOCAL_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #define IEEE_802154_LOCAL_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) int __init ieee802154_nl_init(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) void ieee802154_nl_exit(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #define IEEE802154_OP(_cmd, _func) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) { \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) .cmd = _cmd, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) .doit = _func, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) .dumpit = NULL, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) .flags = GENL_ADMIN_PERM, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #define IEEE802154_DUMP(_cmd, _func, _dump) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) { \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) .cmd = _cmd, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) .doit = _func, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) .dumpit = _dump, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) struct genl_info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) struct sk_buff *ieee802154_nl_create(int flags, u8 req);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) int ieee802154_nl_mcast(struct sk_buff *msg, unsigned int group);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) struct sk_buff *ieee802154_nl_new_reply(struct genl_info *info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) int flags, u8 req);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) int ieee802154_nl_reply(struct sk_buff *msg, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) extern struct genl_family nl802154_family;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) /* genetlink ops/groups */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) int ieee802154_list_phy(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) int ieee802154_dump_phy(struct sk_buff *skb, struct netlink_callback *cb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) int ieee802154_del_iface(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) enum ieee802154_mcgrp_ids {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) IEEE802154_COORD_MCGRP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) IEEE802154_BEACON_MCGRP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) int ieee802154_associate_req(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) int ieee802154_associate_resp(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) int ieee802154_disassociate_req(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) int ieee802154_scan_req(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) int ieee802154_start_req(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) int ieee802154_list_iface(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) int ieee802154_dump_iface(struct sk_buff *skb, struct netlink_callback *cb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) int ieee802154_set_macparams(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) int ieee802154_llsec_getparams(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) int ieee802154_llsec_setparams(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) int ieee802154_llsec_add_key(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) int ieee802154_llsec_del_key(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) int ieee802154_llsec_dump_keys(struct sk_buff *skb,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) struct netlink_callback *cb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) int ieee802154_llsec_add_dev(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) int ieee802154_llsec_del_dev(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) int ieee802154_llsec_dump_devs(struct sk_buff *skb,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) struct netlink_callback *cb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) int ieee802154_llsec_add_devkey(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) int ieee802154_llsec_del_devkey(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) int ieee802154_llsec_dump_devkeys(struct sk_buff *skb,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) struct netlink_callback *cb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) int ieee802154_llsec_add_seclevel(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) int ieee802154_llsec_del_seclevel(struct sk_buff *skb, struct genl_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) int ieee802154_llsec_dump_seclevels(struct sk_buff *skb,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) struct netlink_callback *cb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) #endif