1icmp6_filter(3SOCKET) Sockets Library Functions icmp6_filter(3SOCKET)
2
3
4
6 icmp6_filter - Variable allocation datatype
7
9 void ICMP6_FILTER_SETPASSALL (struct icmp6_filter *);
10
11
12 void ICMP6_FILTER_SETBLOCKALL (struct icmp6_filter *);
13
14
15 void ICMP6_FILTER_SETPASS (int, struct icmp6_filter *);
16
17
18 void ICMP6_FILTER_SETBLOCK (int, struct icmp6_filter *);
19
20
21 int ICMP6_FILTER_WILLPASS (int, const struct icmp6_filter *);
22
23
24 int ICMP6_FILTER_WILLBLOCK (int, const struct icmp6_filter *);
25
26
28 The icmp6_filter structure is similar to the fd_set datatype used with
29 the select() function in the sockets API. The icmp6_filter structure is
30 an opaque datatype and the application should not care how it is imple‐
31 mented. The application allocates a variable of this type, then passes
32 a pointer to it. Next it passes a pointer to a variable of this type to
33 getsockopt() and setsockopt() and operates on a variable of this type
34 using the six macros defined below.
35
36
37 The SETPASSALL and SETBLOCKALL functions enable you to specify that all
38 ICMPv6 messages are passed to the application or that all ICMPv6 mes‐
39 sages are blocked from being passed.
40
41
42 The SETPASS and SETBLOCKALL functions enable you to specify that mes‐
43 sages of a given ICMPv6 type should be passed to the application or not
44 passed to the application (blocked).
45
46
47 The WILLPASS and WILLBLOCK return true or false depending whether the
48 specified message type is passed to the application or blocked from
49 being passed to the application by the filter pointed to by the second
50 argument.
51
52
53 The pointer argument to all six icmp6_filter macros is a pointer to a
54 filter that is modified by the first four macros and is examined by
55 ICMP6_FILTER_SETBLOCK and ICMP6_FILTER_WILLBLOCK. The first argument,
56 (an integer), to the ICMP6_FILTER_BLOCKALL, ICMP6_FILTER_SETPASS,
57 ICMP6_FILTER_SETBLOCK, and ICMP6_FILTER_WILLBLOCK macros is an ICMPv6
58 message type, between 0 and 255.
59
60
61 The current filter is fetched and stored using getsockopt() and set‐
62 sockopt() with a level of IPPROTO_ICMPV6 and an option name of
63 ICMP6_FILTER.
64
66 See attributes(5) for descriptions of the following attributes:
67
68
69
70
71 ┌─────────────────────────────┬─────────────────────────────┐
72 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
73 ├─────────────────────────────┼─────────────────────────────┤
74 │MT-Level │Safe │
75 ├─────────────────────────────┼─────────────────────────────┤
76 │Interface Stability │Standard │
77 └─────────────────────────────┴─────────────────────────────┘
78
79
80
81SunOS 5.11 13 Dec 2003 icmp6_filter(3SOCKET)