Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1232159
  • 博文数量: 177
  • 博客积分: 1528
  • 博客等级: 上尉
  • 技术积分: 1891
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-15 18:03
文章分类

全部博文(177)

文章存档

2020年(1)

2018年(19)

2017年(4)

2016年(21)

2015年(40)

2014年(13)

2013年(26)

2012年(16)

2011年(37)

我的朋友

分类: LINUX

2015-01-05 11:28:19

struct nlmsghdr {

_u32 nlmsg_len;

_u32 nlmsg_type;

_u16 nlmsg_flags;

_u32 nlmsg_seq;

_u32 nlmsg_pid;

};

 RTA_OK(rta, attrlen) returns true if rta points to a valid routing attribute; attrlen is the  running  length
       of the attribute buffer.  When not true then you must assume there are no more attributes in the message, even
       if attrlen is non-zero.
       RTA_DATA(rta) returns a pointer to the start of this attribute's data.
       RTA_PAYLOAD(rta) returns the length of this attribute's data.
       RTA_NEXT(rta, attrlen) gets the next attribute after rta Calling this macro will updateattrlen You should
       use RTA_OK to check for the validity of the returned pointer.
       RTA_LENGTH(len) returns the length which is required for len bytes of data plus the header.
       RTA_SPACE(len) returns the amount of space which will be needed in the message with lenbytes of data.

阅读(2252) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~