diff --git a/TODO b/TODO index 1e5bc84..7e082b5 100644 --- a/TODO +++ b/TODO @@ -3,7 +3,6 @@ an ubuntu, kernel or overall issue 3) parse NL80211_ATTR_WIPHY_BANDS (have workaround currently in place) - after figuring out _CIPHER_SUITES, may be able to get a solution for the bands -4) RFI (1) 6) find a better way to get supported standards of a card 8) Two commands that would add information of minor value o ethtool. uses ioctl but does not follow same pattern as ifconfig seems @@ -35,121 +34,4 @@ - CentOs (?) - slackware - dd-wrt/OpenWRT - 18) port structs from new nl80211.h - -------- Request For Information RFI ---------- - -1) Odd error on what should be a NLE_PERM -When running a root level cmd (reg set) as non-root), I get a return message w/ -the following format: - - nlmsghdr(len=48, type=2, flags=5, seq=1460441619, pid=9865) - genlmsghdr(cmd=255) - attributes: - 0: type = 0, datatype = 0 - value = 1a00050013920c57892600001b000000070021005553 - -and the hex of this message is: - -"\x30\x00\x00\x00\x02\x00\x00\x00\x13\x92\x0c\x57\x89\x26\x00\x00\xff\xff\xff\xff\x1c\x00\x00\x00\x1a\x00\x05\x00\x13\x92\x0c\x57\x89\x26\x00\x00\x1b\x00\x00\x00\x07\x00\x21\x00\x55\x53\x00\x00" - -First, type=2 generally designates an error (at least when executing nl80211). -Second, there is no cmd = 255. Third attempting to parse it as an netlink error -results in a errno of -1. Finally, it does not follow the correct error message -format which should be nlmsghdr+errno+nlmsghdr. - -I checked and this is the same response iw gets. - -* workaround is in place in libnl.nlmsg_fromstream() - -2) ACK messages -PyRIC is set up in a simple send a message & receive the response method. However, -if the caller designates the message with a NLM_F_ACK flag and the ack is not -pulled off the socket subsequent messages will fail due to sequence numbers -mismatching. This is only a problem when using a persistent netlink socket. -ATT I set the NLM_F_ACK flag on all sent packets to ensure we get ack messages -back. - -* workaround is in place in libnl.nl_recvmsg - -3) Hanging terminal -I don't attempt to parse attributes of type nested or unspec. In some situations -when printing the hex values of these attributes on the terminal some character -or set of characters causes the terminal to hang. No combinination of keys etc -can then kill the terminal. I haven't yet looked into trying to determine what -hex value(s) is causing this. - -* workaround is in place in GENLMsg.__repr__ using hexlify - -4) Using deprecated programs/processes -IOT to replicate iw dev info, one has to pass the ifindex (I've tried using -the device name with appropriate attribute type but it fails). The only way to -get the ifindex is by using the supposedly deprecated ioctl (iw does the same). -Seems kind of ironic that the 'new and improved' relies on the old and deprecated - -* no workaround at this point - -5) Error -Netlink provides error codes in netlink/errno.h. However these do not match those -found in /usr/include/asm-generic/errno-base.h and /usr/include/asm-generic/errno.h. -In most cases, it appears that using the netlink errors results in reporting an -incorrect error - there doesn't seem to be any rhyme or reason for this as even -the error codes reporting in the nlmsgerr struct fit linux errors over netlink -errors (in most cases). But, of course there is a catch. NLE_SUCCESS (0) and -NLE_FAILURE (1) as reported in ack/error messages are correct but do not correspond -to the same error code in the linux asm header files. - -* workaround in place, added '-1' as an undefined, use errno for error codes, -error strings and test for NLE_SUCCESS in netlink error message - -6) Setting the channel/Frequency -nl80211.h states that using NL80211_CMD_SET_WIPHY to set the channel is deprecated -in place of NL80211_CMD_SET_CHANNEL. Below is the attempted code: -msg = nl.nlmsg_new(nltype=_familyid_(nlsock), - cmd=nl80211h.NL80211_CMD_SET_CHANNEL, - flags=nlh.NLM_F_REQUEST | nlh.NLM_F_ACK) - nl.nla_put_u32(msg, card.idx, nl80211h.NL80211_ATTR_IFINDEX) - nl.nla_put_u32(msg, channels.ch2rf(ch), nl80211h.NL80211_ATTR_WIPHY_FREQ) - nl.nla_put_u32(msg, channels.CHTYPES.index(chw), nl80211h.NL80211_ATTR_WIPHY_CHANNEL_TYPE) - nl.nl_sendmsg(nlsock, msg) - nl.nl_recvmsg(nlsock) - -and results in a 'Operation not supported' error. -The description for this command in nl80211_h - - * @NL80211_CMD_SET_CHANNEL: Set the channel (using %NL80211_ATTR_WIPHY_FREQ - * and the attributes determining channel width) the given interface - * (identifed by %NL80211_ATTR_IFINDEX) shall operate on. - * In case multiple channels are supported by the device, the mechanism - * with which it switches channels is implementation-defined. - * When a monitor interface is given, it can only switch channel while - * no other interfaces are operating to avoid disturbing the operation - * of any other interfaces, and other interfaces will again take - * precedence when they are used. - -This works if the card is in monitor mode - -* workaround in place, using the deprecated NL80211_CMD_SET_WIPHY - -7) Would like to be able set the tx-power, not just to the max but lower or raise -as desired, neither of the below work in iw or through netlinks - -dev set txpower [] - Specify transmit power level and setting type. - -phy set txpower [] - Specify transmit power level and setting type. - -6) Passwords - On ubuntu at least passwords for APs are stored in /etc/NetworkManager/system-connections - under directory for ssid - -7) Kernel v4 introduces new constants in nl80211.h - - OCB support (Operation outside control of BSS) for vehicles in 5.9 - -8) channel widths - line 2638 of nl80211_h defines channels widths "used with the NL80211_ATTR_CHANNEL_WIDTH" - but these are not the channels as defined for iw which uses enum nl80211_channel_type - However, they are used in: - iw dev set freq [20|40|80|80+80|160] [
] [
] - + 18) port structs from new nl80211.h \ No newline at end of file