7

これは、電話からIPアドレスとMacアドレスを取得する一連の機能の一部です。

strcpy(temp, (char *)ether_ntoa((const struct ether_addr *)LLADDR(sdl)));

編集:同等の関数は必要ありません。ヘッダーがいくつか欠落していました。

編集:LLADDR(sdl)にキャストを追加

4

2 に答える 2

15

As I read it, the error message isn't claiming that the function is missing, only that you don't include its declaration. (I don't know that it exists, only that the message has a different complaint.)

In case it helps, man ether_ntoa tells me:

#include <sys/types.h>
#include <sys/socket.h>
#include <net/ethernet.h>
于 2012-06-28T13:09:17.720 に答える