• using ancillary data (control information) when sending packets with a

    From wkevin@1:0/0 to All on Mon Aug 26 07:59:50 2013
    Subject: using ancillary data (control information) when sending packets with
    a UDP socket

    Hello,
    It is possible to set ancillary data (control information) in the msghdr object when sending data with a UDP packet with the sendmsg() system call.

    Can someone give an example when this is used?

    regards,
    Kevin

    --- MBSE BBS v1.0.0 (GNU/Linux-i386)
    * Origin: The Kofo System II BBS telnet://fido2.kofobb
  • From Richard Kettlewell@110:110/2002 to All on Mon Aug 26 08:11:14 2013
    Subject: Re: using ancillary data (control information) when sending packets with a UDP socket

    wkevin <wkevils@gmail.com> writes:
    It is possible to set ancillary data (control information) in the
    msghdr object when sending data with a UDP packet with the sendmsg()
    system call.

    See ‘man 7 ip’.

    --
    http://www.greenend.org.uk/rjk/

    --- MBSE BBS v1.0.0 (GNU/Linux-i386)
    * Origin: Anjou (110:110/2002@linuxnet)
  • From wkevin@1:0/0 to All on Mon Aug 26 09:05:57 2013
    Subject: Re: using ancillary data (control information) when sending packets
    with a UDP socket

    Thanks, Richard

    looking in man 7 ip:
    http://man7.org/linux/man-pages/man7/ip.7.html


    It seems to me that only the IP_PKTINFO is relevant.
    and it can be used, for example, to set an IP address that is used as the s= ource IP when packets are sent out when using a UDP socket.

    The others options are not relavant/not ancillary:
    IP_RECVERR - for recvmsg()=20
    =20
    IP_RECVOPTS - not ancillary
    (setsockopt (sock, IPPROTO_IP, IP_RECVOPTS, (char *)&on, IP_RECVORIGDSTADDR - recvmsg
    IP_RECVTOS - incoming packets.
    IP_RECVTTL
    IP_RETOPTS
    IP_ROUTER_ALERT - Only valid for raw sockets
    IP_TOS,IP_TRANSPARENT,IP_TTL,IP_UNBLOCK_SOURCE - not ancillar=
    y

    Am I right about it ?=20

    regards,
    Kevin
    =20




    On Monday, August 26, 2013 11:11:14 AM UTC+3, Richard Kettlewell wrote:
    wkevin <wkevils@gmail.com> writes:
    =20
    It is possible to set ancillary data (control information) in the
    =20
    msghdr object when sending data with a UDP packet with the sendmsg()
    =20
    system call.
    =20
    =20
    =20
    See =91man 7 ip=92.
    =20
    =20
    =20
    --=20
    =20
    http://www.greenend.org.uk/rjk/

    --- MBSE BBS v1.0.0 (GNU/Linux-i386)
    * Origin: The Kofo System II BBS telnet://fido2.kofobb