Skip to content

Instantly share code, notes, and snippets.

View BGPSurfing's full-sized avatar

Shaiming Ma BGPSurfing

View GitHub Profile
@kelvin-fly
kelvin-fly / ip1.c
Created July 2, 2012 09:45
a small code using sockaddr_in and ifreq to get ip and mac
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<net/if.h>
#include<arpa/inet.h>
#include<linux/sockios.h>
int main(int argc,char **argv)
{