szehl / ath9k-hmac

ATH9K HMAC
Apache License 2.0
22 stars 6 forks source link

I meet a problem ,can your help me ? thankyou #1

Open gechangwei opened 7 years ago

gechangwei commented 7 years ago

hi:

I try your code,but i have some problem with "cd ~/hmac/ath9k-hmac/hmac_userspace_daemon; make;" when i make have lots of problems :

grant@grant-Aspire-4743:~/hmac/ath9k-hmac/hmac_userspace_daemon$ make g++ hybrid_tdma_csma_mac.c -I /usr/include/libnl3/ -DCONFIG_LIBNL30 -o hmac_userspace_daemon -levent -lnl-genl-3 -lnl-3 -lzmq -lstdc++ -lpthread hybrid_tdma_csma_mac.c: In function ‘int send_nl_msg(std::string&)’: hybrid_tdma_csma_mac.c:263:38: error: cannot convert ‘nl_sock’ to ‘nl_handle’ for argument ‘1’ to ‘void nl_socket_set_cb(nl_handle, nl_cb)’ nl_socket_set_cb(state.nl_sock, s_cb); ^ hybrid_tdma_csma_mac.c:266:48: error: cannot convert ‘nl_sock’ to ‘nl_handle’ for argument ‘1’ to ‘int nl_send_auto_complete(nl_handle, nl_msg)’ err = nl_send_auto_complete(state.nl_sock, msg); ^ hybrid_tdma_csma_mac.c:281:32: error: cannot convert ‘nl_sock’ to ‘nl_handle’ for argument ‘1’ to ‘int nl_recvmsgs(nl_handle, nl_cb)’ nl_recvmsgs(state.nl_sock, cb); ^ hybrid_tdma_csma_mac.c: In function ‘int nl80211_init(nl80211_state)’: hybrid_tdma_csma_mac.c:301:35: error: ‘nl_socket_alloc’ was not declared in this scope state->nl_sock = nl_socket_alloc(); ^ hybrid_tdma_csma_mac.c:307:54: error: ‘nl_socket_set_buffer_size’ was not declared in this scope nl_socket_set_buffer_size(state->nl_sock, 8192, 8192); ^ hybrid_tdma_csma_mac.c:309:33: error: cannot convert ‘nl_sock’ to ‘nl_handle’ for argument ‘1’ to ‘int genl_connect(nl_handle)’ if (genl_connect(state->nl_sock)) { ^ hybrid_tdma_csma_mac.c:312:32: error: ‘nl_socket_free’ was not declared in this scope nl_socket_free(state->nl_sock); ^ hybrid_tdma_csma_mac.c:316:65: error: cannot convert ‘nl_sock’ to ‘nl_handle’ for argument ‘1’ to ‘int genl_ctrl_resolve(nl_handle, const char)’ state->nl80211_id = genl_ctrl_resolve(state->nl_sock, "nl80211"); ^ hybrid_tdma_csma_mac.c:320:32: error: ‘nl_socket_free’ was not declared in this scope nl_socket_free(state->nl_sock); ^ hybrid_tdma_csma_mac.c:327:32: error: ‘nl_socket_free’ was not declared in this scope nl_socket_free(state->nl_sock); ^ make: *** [hybrid_tdma_csma_mac_x86] 错误 1 grant@grant-Aspire-4743:~/hmac/ath9k-hmac/hmac_userspace_daemon$

thankyou i want get your help

szehl commented 7 years ago

Hi, which Version of libnl have you installed? This looks like a problem with the Netlink library. Could you try to install libnl-3-dev and genl-3-dev, e.g. for debian or ubuntu sudo apt-get install libnl-3-dev libnl-genl-3-dev? And then try again to run make? If this is also does not work, please post the output of the command uname -a (utilized kernel). Best, Sven

gechangwei commented 7 years ago

hi sven:

Thank you for your reply,i fellow your suggest,the problem was solved. when i fellow the step about: cd ~/hmac/ath9k-hmac/; python hmac_python_wrapper/hmac_example.py have a problem: grant@grant-Aspire-4743:~/hmac/ath9k-hmac/hmac_python_wrapper$ python hmac_example.py Traceback (most recent call last): File "hmac_example.py", line 7, in from hmac_python_wrapper import HybridTDMACSMAMac, AccessPolicy File "/home/grant/hmac/ath9k-hmac/hmac_python_wrapper/hmac_python_wrapper.py", line 7, in import zmq ImportError: No module named zmq grant@grant-Aspire-4743:~/hmac/ath9k-hmac/hmac_python_wrapper$

I try to install the zmq about: pip install zmq, but can't install this package, I think the zmq should be a module for python.I try to google to help,but can't solve this problem. Could you also tell me ? thank you.

thank you again

Best, grant

szehl commented 7 years ago

Hi, just try to install libzmq-dev and python-zmq, e.g. sudo apt-get install libzmq3-dev python-zmq this should solve the problem. Best, Sven