加载中…
个人资料
liufeifei11
liufeifei11
  • 博客等级:
  • 博客积分:0
  • 博客访问:46,339
  • 关注人气:5
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
相关博文
推荐博文
正文 字体大小:

struct nlmsghdr

(2012-02-28 09:41:14)
标签:

杂谈

分类: linux程序
struct nlmsghdr:

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 update attrlen 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 len bytes of data.


0

阅读 评论 收藏 转载 喜欢 打印举报/Report
  • 评论加载中,请稍候...
发评论

    发评论

    以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

      

    新浪BLOG意见反馈留言板 电话:4000520066 提示音后按1键(按当地市话标准计费) 欢迎批评指正

    新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 会员注册 | 产品答疑

    新浪公司 版权所有