小默

implicit declaration of function 'NIPQUAD'

Q:implicit declaration of function 'NIPQUAD'
A:

http://kerneltrap.org/mailarchive/linux-netdev/2008/10/31/3873584

 Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u
can be replaced with %pI4

-  dprintf("SRC: %u.%u.%u.%u. Mask: %u.%u.%u.%u. Target: %u.%u.%u.%u.%s\n",
-   NIPQUAD(src_ipaddr),
-   NIPQUAD(arpinfo->smsk.s_addr),
-   NIPQUAD(arpinfo->src.s_addr),
+  dprintf("SRC: %pI4. Mask: %pI4. Target: %pI4.%s\n",
+   &src_ipaddr,
+   &arpinfo->smsk.s_addr,
+   &arpinfo->src.s_addr,
    arpinfo->invflags & ARPT_INV_SRCIP ? " (INV)" : "");

posted on 2011-01-27 04:28 小默 阅读(1481) 评论(0)  编辑 收藏 引用 所属分类: Linux


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


导航

统计

留言簿(13)

随笔分类(287)

随笔档案(289)

漏洞

搜索

积分与排名

最新评论

阅读排行榜