hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/include/uapi/linux/batadv_packet.h
....@@ -1,19 +1,7 @@
11 /* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) */
2
-/* Copyright (C) 2007-2018 B.A.T.M.A.N. contributors:
2
+/* Copyright (C) 2007-2020 B.A.T.M.A.N. contributors:
33 *
44 * Marek Lindner, Simon Wunderlich
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of version 2 of the GNU General Public
8
- * License as published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful, but
11
- * WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- * General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
175 */
186
197 #ifndef _UAPI_LINUX_BATADV_PACKET_H_
....@@ -84,8 +72,8 @@
8472
8573 /**
8674 * enum batadv_iv_flags - flags used in B.A.T.M.A.N. IV OGM packets
87
- * @BATADV_NOT_BEST_NEXT_HOP: flag is set when ogm packet is forwarded and was
88
- * previously received from someone else than the best neighbor.
75
+ * @BATADV_NOT_BEST_NEXT_HOP: flag is set when the ogm packet is forwarded and
76
+ * was previously received from someone other than the best neighbor.
8977 * @BATADV_PRIMARIES_FIRST_HOP: flag unused.
9078 * @BATADV_DIRECTLINK: flag is for the first hop or if rebroadcasted from a
9179 * one hop neighbor on the interface where it was originally received.
....@@ -119,12 +107,20 @@
119107 * @BATADV_MCAST_WANT_ALL_UNSNOOPABLES: we want all packets destined for
120108 * 224.0.0.0/24 or ff02::1
121109 * @BATADV_MCAST_WANT_ALL_IPV4: we want all IPv4 multicast packets
110
+ * (both link-local and routable ones)
122111 * @BATADV_MCAST_WANT_ALL_IPV6: we want all IPv6 multicast packets
112
+ * (both link-local and routable ones)
113
+ * @BATADV_MCAST_WANT_NO_RTR4: we have no IPv4 multicast router and therefore
114
+ * only need routable IPv4 multicast packets we signed up for explicitly
115
+ * @BATADV_MCAST_WANT_NO_RTR6: we have no IPv6 multicast router and therefore
116
+ * only need routable IPv6 multicast packets we signed up for explicitly
123117 */
124118 enum batadv_mcast_flags {
125119 BATADV_MCAST_WANT_ALL_UNSNOOPABLES = 1UL << 0,
126120 BATADV_MCAST_WANT_ALL_IPV4 = 1UL << 1,
127121 BATADV_MCAST_WANT_ALL_IPV6 = 1UL << 2,
122
+ BATADV_MCAST_WANT_NO_RTR4 = 1UL << 3,
123
+ BATADV_MCAST_WANT_NO_RTR6 = 1UL << 4,
128124 };
129125
130126 /* tt data subtypes */
....@@ -199,8 +195,8 @@
199195 /**
200196 * struct batadv_ogm_packet - ogm (routing protocol) packet
201197 * @packet_type: batman-adv packet type, part of the general header
202
- * @version: batman-adv protocol version, part of the genereal header
203
- * @ttl: time to live for this packet, part of the genereal header
198
+ * @version: batman-adv protocol version, part of the general header
199
+ * @ttl: time to live for this packet, part of the general header
204200 * @flags: contains routing relevant flags - see enum batadv_iv_flags
205201 * @seqno: sequence identification
206202 * @orig: address of the source node
....@@ -229,7 +225,7 @@
229225 * @packet_type: batman-adv packet type, part of the general header
230226 * @version: batman-adv protocol version, part of the general header
231227 * @ttl: time to live for this packet, part of the general header
232
- * @flags: reseved for routing relevant flags - currently always 0
228
+ * @flags: reserved for routing relevant flags - currently always 0
233229 * @seqno: sequence number
234230 * @orig: originator mac address
235231 * @tvlv_len: length of the appended tvlv buffer (in bytes)
....@@ -251,7 +247,7 @@
251247 /**
252248 * struct batadv_elp_packet - elp (neighbor discovery) packet
253249 * @packet_type: batman-adv packet type, part of the general header
254
- * @version: batman-adv protocol version, part of the genereal header
250
+ * @version: batman-adv protocol version, part of the general header
255251 * @orig: originator mac address
256252 * @seqno: sequence number
257253 * @elp_interval: currently used ELP sending interval in ms
....@@ -269,15 +265,15 @@
269265 /**
270266 * struct batadv_icmp_header - common members among all the ICMP packets
271267 * @packet_type: batman-adv packet type, part of the general header
272
- * @version: batman-adv protocol version, part of the genereal header
273
- * @ttl: time to live for this packet, part of the genereal header
268
+ * @version: batman-adv protocol version, part of the general header
269
+ * @ttl: time to live for this packet, part of the general header
274270 * @msg_type: ICMP packet type
275271 * @dst: address of the destination node
276272 * @orig: address of the source node
277273 * @uid: local ICMP socket identifier
278274 * @align: not used - useful for alignment purposes only
279275 *
280
- * This structure is used for ICMP packets parsing only and it is never sent
276
+ * This structure is used for ICMP packet parsing only and it is never sent
281277 * over the wire. The alignment field at the end is there to ensure that
282278 * members are padded the same way as they are in real packets.
283279 */
....@@ -295,8 +291,8 @@
295291 /**
296292 * struct batadv_icmp_packet - ICMP packet
297293 * @packet_type: batman-adv packet type, part of the general header
298
- * @version: batman-adv protocol version, part of the genereal header
299
- * @ttl: time to live for this packet, part of the genereal header
294
+ * @version: batman-adv protocol version, part of the general header
295
+ * @ttl: time to live for this packet, part of the general header
300296 * @msg_type: ICMP packet type
301297 * @dst: address of the destination node
302298 * @orig: address of the source node
....@@ -319,8 +315,8 @@
319315 /**
320316 * struct batadv_icmp_tp_packet - ICMP TP Meter packet
321317 * @packet_type: batman-adv packet type, part of the general header
322
- * @version: batman-adv protocol version, part of the genereal header
323
- * @ttl: time to live for this packet, part of the genereal header
318
+ * @version: batman-adv protocol version, part of the general header
319
+ * @ttl: time to live for this packet, part of the general header
324320 * @msg_type: ICMP packet type
325321 * @dst: address of the destination node
326322 * @orig: address of the source node
....@@ -362,8 +358,8 @@
362358 /**
363359 * struct batadv_icmp_packet_rr - ICMP RouteRecord packet
364360 * @packet_type: batman-adv packet type, part of the general header
365
- * @version: batman-adv protocol version, part of the genereal header
366
- * @ttl: time to live for this packet, part of the genereal header
361
+ * @version: batman-adv protocol version, part of the general header
362
+ * @ttl: time to live for this packet, part of the general header
367363 * @msg_type: ICMP packet type
368364 * @dst: address of the destination node
369365 * @orig: address of the source node
....@@ -401,8 +397,8 @@
401397 /**
402398 * struct batadv_unicast_packet - unicast packet for network payload
403399 * @packet_type: batman-adv packet type, part of the general header
404
- * @version: batman-adv protocol version, part of the genereal header
405
- * @ttl: time to live for this packet, part of the genereal header
400
+ * @version: batman-adv protocol version, part of the general header
401
+ * @ttl: time to live for this packet, part of the general header
406402 * @ttvn: translation table version number
407403 * @dest: originator destination of the unicast packet
408404 */
....@@ -437,8 +433,8 @@
437433 /**
438434 * struct batadv_frag_packet - fragmented packet
439435 * @packet_type: batman-adv packet type, part of the general header
440
- * @version: batman-adv protocol version, part of the genereal header
441
- * @ttl: time to live for this packet, part of the genereal header
436
+ * @version: batman-adv protocol version, part of the general header
437
+ * @ttl: time to live for this packet, part of the general header
442438 * @dest: final destination used when routing fragments
443439 * @orig: originator of the fragment used when merging the packet
444440 * @no: fragment number within this sequence
....@@ -471,8 +467,8 @@
471467 /**
472468 * struct batadv_bcast_packet - broadcast packet for network payload
473469 * @packet_type: batman-adv packet type, part of the general header
474
- * @version: batman-adv protocol version, part of the genereal header
475
- * @ttl: time to live for this packet, part of the genereal header
470
+ * @version: batman-adv protocol version, part of the general header
471
+ * @ttl: time to live for this packet, part of the general header
476472 * @reserved: reserved byte for alignment
477473 * @seqno: sequence identification
478474 * @orig: originator of the broadcast packet
....@@ -492,10 +488,10 @@
492488 /**
493489 * struct batadv_coded_packet - network coded packet
494490 * @packet_type: batman-adv packet type, part of the general header
495
- * @version: batman-adv protocol version, part of the genereal header
496
- * @ttl: time to live for this packet, part of the genereal header
491
+ * @version: batman-adv protocol version, part of the general header
492
+ * @ttl: time to live for this packet, part of the general header
497493 * @first_source: original source of first included packet
498
- * @first_orig_dest: original destinal of first included packet
494
+ * @first_orig_dest: original destination of first included packet
499495 * @first_crc: checksum of first included packet
500496 * @first_ttvn: tt-version number of first included packet
501497 * @second_ttl: ttl of second packet
....@@ -527,8 +523,8 @@
527523 /**
528524 * struct batadv_unicast_tvlv_packet - generic unicast packet with tvlv payload
529525 * @packet_type: batman-adv packet type, part of the general header
530
- * @version: batman-adv protocol version, part of the genereal header
531
- * @ttl: time to live for this packet, part of the genereal header
526
+ * @version: batman-adv protocol version, part of the general header
527
+ * @ttl: time to live for this packet, part of the general header
532528 * @reserved: reserved field (for packet alignment)
533529 * @src: address of the source
534530 * @dst: address of the destination