1 .\" Copyright (c) 2003 Bruce M. Simpson. All rights reserved.
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
6 .\" 1. Redistributions of source code must retain the above copyright
7 .\" notice, this list of conditions and the following disclaimer.
9 .\" THIS SOFTWARE IS PROVIDED BY Bruce M. Simpson ``AS IS'' AND
10 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
12 .\" ARE DISCLAIMED. IN NO EVENT SHALL Bruce M. Simpson BE LIABLE
13 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 .\" $FreeBSD: src/lib/libc/net/getifmaddrs.3,v 1.3.22.1.4.1 2010/06/14 02:09:06 kensmith Exp $
28 .Nd get multicast group memberships
34 .Fn getifmaddrs "struct ifmaddrs **ifmap"
36 .Fn freeifmaddrs "struct ifmaddrs *ifmp"
40 function stores a reference to a linked list of the multicast memberships
41 on the local machine in the memory referenced by
45 structures, as defined in the include file
49 structure contains at least the following entries:
51 struct ifmaddrs *ifma_next; /* Pointer to next struct */
52 struct sockaddr *ifma_name; /* Interface name (AF_LINK) */
53 struct sockaddr *ifma_addr; /* Multicast address */
54 struct sockaddr *ifma_lladdr; /* Link-layer translation, if any */
59 field contains a pointer to the next structure on the list.
62 in last structure on the list.
68 address structure, containing the name of the
69 interface where the membership exists.
73 references the address that this membership is for.
77 field references a link-layer translation for the protocol-level address in
79 if one is set, otherwise it is
84 is dynamically allocated and should be freed using
86 when no longer needed.
94 for any of the errors specified for the library routines
105 function first appeared in