mirror of https://github.com/mkerrisk/man-pages
ffix
This commit is contained in:
parent
0119b1823b
commit
9584332da4
17
man3/cmsg.3
17
man3/cmsg.3
|
@ -168,16 +168,15 @@ int *ttlptr;
|
|||
int received_ttl;
|
||||
|
||||
/* Receive auxiliary data in msgh */
|
||||
for (cmsg = CMSG_FIRSTHDR(&msgh);
|
||||
cmsg != NULL;
|
||||
cmsg = CMSG_NXTHDR(&msgh,cmsg)) {
|
||||
if (cmsg\->cmsg_level == IPPROTO_IP
|
||||
&& cmsg\->cmsg_type == IP_TTL) {
|
||||
ttlptr = (int *) CMSG_DATA(cmsg);
|
||||
received_ttl = *ttlptr;
|
||||
break;
|
||||
}
|
||||
for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;
|
||||
cmsg = CMSG_NXTHDR(&msgh,cmsg)) {
|
||||
if (cmsg\->cmsg_level == IPPROTO_IP
|
||||
&& cmsg\->cmsg_type == IP_TTL) {
|
||||
ttlptr = (int *) CMSG_DATA(cmsg);
|
||||
received_ttl = *ttlptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cmsg == NULL) {
|
||||
/*
|
||||
* Error: IP_TTL not enabled or small buffer
|
||||
|
|
Loading…
Reference in New Issue