rtnetlink.3: tfix
PATCH 1/1 rtnetlink.3: tfix
It seems that the structure in this example doesn't have a field named n.
Signed-off-by Hu Keping <[email protected]>
--- man3/rtnetlink.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man3/rtnetlink.3 +1 -1
@@ -113,7 +113,7 @@ Creating a rtnetlink message to set the MTU of a device: NLMSG_ALIGN(req.nh.nlmsg_len)); rta\->rta_type = IFLA_MTU; rta\->rta_len = RTA_LENGTH(sizeof(unsigned int)); - req.n.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) + + req.nh.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) + RTA_LENGTH(sizeof(mtu)); memcpy(RTA_DATA(rta), &mtu, sizeof(mtu)); send(rtnetlink_sk, &req, req.nh.nlmsg_len, 0);
Signature · 6 lines
2.8.0.GIT -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1473058499-23820-1-git-send-email-hukeping-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
Hello Hu Keping,
Quoted 2 lines · HuKeping
It seems that the structure in this example doesn't have a field named n.
Thanks. Patch applied.
Cheers,
Michael
Quoted 19 lines
Signed-off-by Hu Keping <[email protected]>--- man3/rtnetlink.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)man3/rtnetlink.3 +1
-1@@ -113,7 +113,7 @@ Creating a rtnetlink message to set the MTU of a device: NLMSG_ALIGN(req.nh.nlmsg_len)); rta\->rta_type = IFLA_MTU; rta\->rta_len = RTA_LENGTH(sizeof(unsigned int)); - req.n.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) + + req.nh.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) + RTA_LENGTH(sizeof(mtu)); memcpy(RTA_DATA(rta), &mtu, sizeof(mtu)); send(rtnetlink_sk, &req, req.nh.nlmsg_len, 0);
Signature · 7 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html