diff options
| author | stkhan <personal@slickd.xyz> | 2022-05-13 18:15:43 +0000 |
|---|---|---|
| committer | stkhan <personal@slickd.xyz> | 2022-05-13 18:15:43 +0000 |
| commit | 2e81fbdf15168a5b6df291b7062d120156a5ce45 (patch) | |
| tree | 57de36552c6f46e43d8520ccf65acb80ef5f6c29 /scripts/ip.c | |
| parent | 7a93f153bf5e088ab6e2da6fcc0518744cfd54af (diff) | |
Removed dwm scripts, sfm, , added scroll, and added dark theme to surf
Diffstat (limited to 'scripts/ip.c')
| -rw-r--r-- | scripts/ip.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/scripts/ip.c b/scripts/ip.c deleted file mode 100644 index 3276696..0000000 --- a/scripts/ip.c +++ /dev/null @@ -1,32 +0,0 @@ -#include <stdio.h> -#include <unistd.h> -#include <string.h> /* for strncpy */ - -#include <sys/types.h> -#include <sys/socket.h> -#include <sys/ioctl.h> -#include <netinet/in.h> -#include <net/if.h> -#include <arpa/inet.h> - -int -main() -{ - int fd; - struct ifreq ifr; - - fd = socket(AF_INET, SOCK_DGRAM, 0); - - /* I want to get an IPv4 IP address */ - ifr.ifr_addr.sa_family = AF_INET; - strncpy(ifr.ifr_name, "wlan0", IFNAMSIZ-1); - - ioctl(fd, SIOCGIFADDR, &ifr); - - close(fd); - - /* display result */ - printf("%s\n", inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr)); - - return 0; -} |