VSF Documented
Data Structures | Macros | Enumerations
rtnetlink.h File Reference
#include "../sys/types.h"

Go to the source code of this file.

Data Structures

struct  ifinfomsg
 
struct  rtattr
 

Macros

#define RTMGRP_LINK   1
 
#define RTMGRP_IPV4_IFADDR   0x10
 
#define RTM_NEWLINK   RTM_NEWLINK
 
#define RTM_DELLINK   RTM_DELLINK
 
#define RTM_NEWADDR   RTM_NEWADDR
 
#define RTM_DELADDR   RTM_DELADDR
 
#define RTA_ALIGNTO   4U
 
#define RTA_ALIGN(len)   (((len) + RTA_ALIGNTO - 1) & ~(RTA_ALIGNTO- 1 ))
 
#define RTA_OK(rta, len)
 
#define RTA_NEXT(rta, attrlen)
 
#define RTA_LENGTH(len)   (RTA_ALIGN(sizeof(struct rtattr)) + (len))
 
#define RTA_SPACE(len)   RTA_ALIGN(RTA_LENGTH(len))
 
#define RTA_DATA(rta)   ((void*)(((char*)(rta)) + RTA_LENGTH(0)))
 
#define RTA_PAYLOAD(rta)   ((int)((rta)->rta_len) - RTA_LENGTH(0))
 

Enumerations

enum  {
  RTM_NEWLINK = 16 ,
  RTM_NEWLINK = 16 ,
  RTM_DELLINK ,
  RTM_DELLINK ,
  RTM_NEWADDR ,
  RTM_NEWADDR ,
  RTM_DELADDR ,
  RTM_DELADDR
}
 

Macro Definition Documentation

◆ RTMGRP_LINK

#define RTMGRP_LINK   1

◆ RTMGRP_IPV4_IFADDR

#define RTMGRP_IPV4_IFADDR   0x10

◆ RTM_NEWLINK

#define RTM_NEWLINK   RTM_NEWLINK

◆ RTM_DELLINK

#define RTM_DELLINK   RTM_DELLINK

◆ RTM_NEWADDR

#define RTM_NEWADDR   RTM_NEWADDR

◆ RTM_DELADDR

#define RTM_DELADDR   RTM_DELADDR

◆ RTA_ALIGNTO

#define RTA_ALIGNTO   4U

◆ RTA_ALIGN

#define RTA_ALIGN (   len)    (((len) + RTA_ALIGNTO - 1) & ~(RTA_ALIGNTO- 1 ))

◆ RTA_OK

#define RTA_OK (   rta,
  len 
)
Value:
((len) >= (int)sizeof(struct rtattr) && \
(rta)->rta_len >= sizeof(struct rtattr) && \
(rta)->rta_len <= (len))
Definition rtnetlink.h:33
unsigned short rta_len
Definition rtnetlink.h:34

◆ RTA_NEXT

#define RTA_NEXT (   rta,
  attrlen 
)
Value:
((attrlen) -= RTA_ALIGN((rta)->rta_len), \
(struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len)))

◆ RTA_LENGTH

#define RTA_LENGTH (   len)    (RTA_ALIGN(sizeof(struct rtattr)) + (len))

◆ RTA_SPACE

#define RTA_SPACE (   len)    RTA_ALIGN(RTA_LENGTH(len))

◆ RTA_DATA

#define RTA_DATA (   rta)    ((void*)(((char*)(rta)) + RTA_LENGTH(0)))

◆ RTA_PAYLOAD

#define RTA_PAYLOAD (   rta)    ((int)((rta)->rta_len) - RTA_LENGTH(0))

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RTM_NEWLINK 
RTM_NEWLINK 
RTM_DELLINK 
RTM_DELLINK 
RTM_NEWADDR 
RTM_NEWADDR 
RTM_DELADDR 
RTM_DELADDR