Hi guys, In putting in Stefan's patch for setting short address, PAN ID, and channel from iz ("iz set" command), I noticed that the kernel will return a netlink status code if the PAN ID is invalid (0xffff)[1]. The code it returns is IEEE802154_NO_SHORT_ADDRESS which is defined in include/net/ieee802154.h[2]. That file contains MAC enumerations from the 802.15.4 standard, and is not exported to userspace.
In a similar way, I'd like to return an error when the channel set is not supported by the driver (phy->supported_channels). I can't very well add to the enum in ieee802154.h because those are values which are mandated by the standard. I see how the netlink requests and responses mirror the MAC commands as listed in the standard, (which means maybe we _should_ be exporting ieee802154.h into userspace), but it seems like in this one I have a parameter and nowhere to add it. It _could_ go in nl802154.h[3] but then we'd be returning codes from different enums in different files (and we still have to step on top of "reserved" space in the ieee 802.15.4 standard. Another option is to have a separate return attribute which is specific to our implementation, and could contain more detailed information (the kind you might expect to see from the command line output). Do any of you have any thoughts regarding the "right" way to do this, or the way it was intended to be done? Alan. [1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/net/ieee802154/nl-mac.c#n470 [2] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/net/ieee802154.h#n127 [3] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/linux/nl802154.h ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel