Created
November 6, 2015 11:06
-
-
Save jbiason/ded68df0290e0ef772f2 to your computer and use it in GitHub Desktop.
ether functions do not work with -std=c11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "netinet/ether.h" | |
#include "net/ethernet.h" | |
#include "stdio.h" | |
#include <stdlib.h> | |
#include <string.h> | |
int main(int argc, char *argv[]) { | |
struct ether_addr address; | |
char buffer[30]; | |
ether_aton_r("f8:b1:56:fb:e9:57", &address); | |
memset(buffer, 0, 30); | |
ether_ntoa_r((const struct ether_addr*)&address, buffer); | |
printf("%s\n", buffer); | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment