The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
if.h
Go to the documentation of this file.
1#pragma once
2
3#include <sys/socket.h>
4
5/**
6 * @file net/if.h
7 * @brief network interfaces: struct ifreq for the SIOC ioctls of
8 * <sys/ioctl.h>, which work on any AF_INET socket.
9 *
10 * the layout is Linux's; it must match kifreq_t in
11 * src/kernel/net/netif.h.
12 */
13
14#define IFNAMSIZ 16
15
16#define IFF_UP 0x0001
17#define IFF_BROADCAST 0x0002
18#define IFF_LOOPBACK 0x0008
19#define IFF_RUNNING 0x0040
20
21struct ifreq
22{
24 union
25 {
26 struct sockaddr ifru_addr;
29 struct sockaddr ifru_hwaddr;
30 short ifru_flags;
31 int ifru_mtu;
32 unsigned long __pad[3];
34};
35
36#define ifr_addr ifr_ifru.ifru_addr
37#define ifr_netmask ifr_ifru.ifru_netmask
38#define ifr_broadaddr ifr_ifru.ifru_broadaddr
39#define ifr_hwaddr ifr_ifru.ifru_hwaddr
40#define ifr_flags ifr_ifru.ifru_flags
41#define ifr_mtu ifr_ifru.ifru_mtu
#define IFNAMSIZ
Definition if.h:14
sockets: Unix domain stream sockets, with file descriptor passing, and IPv4 sockets (TCP; UDP,...
Definition if.h:22
char ifr_name[IFNAMSIZ]
Definition if.h:23
union ifreq::@306174253263321056255122176204030045007225337336 ifr_ifru
Definition socket.h:25
unsigned long __pad[3]
struct sockaddr ifru_hwaddr
struct sockaddr ifru_netmask
struct sockaddr ifru_addr
struct sockaddr ifru_broadaddr