igmp(ADMP)
igmp --
Internet Group Management Protocol
Syntax
Programmer's interface:
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
s = socket(AF_INET, SOCK_RAW, proto);
#include <paths.h>
#include <fcntl.h>
#include <netinet/ip_var.h>
#include <netinet/igmp_var.h>
fd = open(_PATH_IGMP, flags);
Description
IGMP is used by Internet hosts and routers to
keep track of multicast groups. It may be accessed through
a ``raw socket'' for network monitoring and diagnostic
functions. The proto parameter to the socket
call to create an IGMP socket is obtained from
getprotobyname (See
getprotoent(SLIB).)
IGMP sockets are connectionless, and are normally
used with the sendto and recvfrom
calls; the
connect(SSC)
call may also be used to fix the destination for future
packets (in which case the
read(S)
or
recv(SSC)
and
write(S)
or
send(SSC)
system calls may be used).
Outgoing packets automatically have an IP header
prepended to them (based on the destination address).
Incoming packets are received with the IP header
and options intact.
The IGMP driver can also be accessed by opening
it directly. Networking statistics can be gathered by
issuing an ioctl directive to the driver.
The following STREAMS ioctl requests,
defined in <netinet/ip_var.h>, and
<netinet/igmp_var.h> are supported by the
IGMP driver :
SIOCGIGMPSTATS-
Fetch the IGMP statistics structure. The argument
passed to the I_STR call is a pointer to an
igmpstat structure.
SIOCSMGMT-
To set the inpcb associated with that end-point
as a management inpcb (to distinguish it from
others, when network statistics are gathered).
Diagnostics
A socket operation may fail with one of the following errors returned:
[EISCONN]-
when trying to establish a connection on a socket which
already has one, or when trying to send a datagram with the destination
address specified and the socket is already connected;
[ENOTCONN]-
when trying to send a datagram, but
no destination address is specified, and the socket hasn't been
connected;
[ENOSR]-
when the system runs out of memory for
an internal data structure;
[EADDRNOTAVAIL]-
when an attempt is made to create a
socket with a network address for which no network interface
exists.
The errno is set to the following value upon the
failure of the ioctl operation:
[EINVAL]-
when no argument/NULL argument is passed to the driver.
Files
/dev/inet/igmp
See also
Intro(ADMP),
inet(ADMP),
ip(ADMP),
recv(SSC),
send(SSC),
streamio(M)
Standards conformance
igmp is conformant with
RFC 1112 (STD 5)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003