ieee802154.h 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Copyright (C) 2007, 2008, 2009 Siemens AG
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2
  6. * as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. */
  14. #ifndef IEEE_802154_LOCAL_H
  15. #define IEEE_802154_LOCAL_H
  16. int __init ieee802154_nl_init(void);
  17. void ieee802154_nl_exit(void);
  18. #define IEEE802154_OP(_cmd, _func) \
  19. { \
  20. .cmd = _cmd, \
  21. .policy = ieee802154_policy, \
  22. .doit = _func, \
  23. .dumpit = NULL, \
  24. .flags = GENL_ADMIN_PERM, \
  25. }
  26. #define IEEE802154_DUMP(_cmd, _func, _dump) \
  27. { \
  28. .cmd = _cmd, \
  29. .policy = ieee802154_policy, \
  30. .doit = _func, \
  31. .dumpit = _dump, \
  32. }
  33. struct genl_info;
  34. struct sk_buff *ieee802154_nl_create(int flags, u8 req);
  35. int ieee802154_nl_mcast(struct sk_buff *msg, unsigned int group);
  36. struct sk_buff *ieee802154_nl_new_reply(struct genl_info *info,
  37. int flags, u8 req);
  38. int ieee802154_nl_reply(struct sk_buff *msg, struct genl_info *info);
  39. extern struct genl_family nl802154_family;
  40. /* genetlink ops/groups */
  41. int ieee802154_list_phy(struct sk_buff *skb, struct genl_info *info);
  42. int ieee802154_dump_phy(struct sk_buff *skb, struct netlink_callback *cb);
  43. int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info);
  44. int ieee802154_del_iface(struct sk_buff *skb, struct genl_info *info);
  45. enum ieee802154_mcgrp_ids {
  46. IEEE802154_COORD_MCGRP,
  47. IEEE802154_BEACON_MCGRP,
  48. };
  49. int ieee802154_associate_req(struct sk_buff *skb, struct genl_info *info);
  50. int ieee802154_associate_resp(struct sk_buff *skb, struct genl_info *info);
  51. int ieee802154_disassociate_req(struct sk_buff *skb, struct genl_info *info);
  52. int ieee802154_scan_req(struct sk_buff *skb, struct genl_info *info);
  53. int ieee802154_start_req(struct sk_buff *skb, struct genl_info *info);
  54. int ieee802154_list_iface(struct sk_buff *skb, struct genl_info *info);
  55. int ieee802154_dump_iface(struct sk_buff *skb, struct netlink_callback *cb);
  56. int ieee802154_set_macparams(struct sk_buff *skb, struct genl_info *info);
  57. int ieee802154_llsec_getparams(struct sk_buff *skb, struct genl_info *info);
  58. int ieee802154_llsec_setparams(struct sk_buff *skb, struct genl_info *info);
  59. int ieee802154_llsec_add_key(struct sk_buff *skb, struct genl_info *info);
  60. int ieee802154_llsec_del_key(struct sk_buff *skb, struct genl_info *info);
  61. int ieee802154_llsec_dump_keys(struct sk_buff *skb,
  62. struct netlink_callback *cb);
  63. int ieee802154_llsec_add_dev(struct sk_buff *skb, struct genl_info *info);
  64. int ieee802154_llsec_del_dev(struct sk_buff *skb, struct genl_info *info);
  65. int ieee802154_llsec_dump_devs(struct sk_buff *skb,
  66. struct netlink_callback *cb);
  67. int ieee802154_llsec_add_devkey(struct sk_buff *skb, struct genl_info *info);
  68. int ieee802154_llsec_del_devkey(struct sk_buff *skb, struct genl_info *info);
  69. int ieee802154_llsec_dump_devkeys(struct sk_buff *skb,
  70. struct netlink_callback *cb);
  71. int ieee802154_llsec_add_seclevel(struct sk_buff *skb, struct genl_info *info);
  72. int ieee802154_llsec_del_seclevel(struct sk_buff *skb, struct genl_info *info);
  73. int ieee802154_llsec_dump_seclevels(struct sk_buff *skb,
  74. struct netlink_callback *cb);
  75. #endif