![]() |
|
|||
0001 /* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) */ 0002 /* Copyright (C) B.A.T.M.A.N. contributors: 0003 * 0004 * Marek Lindner, Simon Wunderlich 0005 */ 0006 0007 #ifndef _UAPI_LINUX_BATADV_PACKET_H_ 0008 #define _UAPI_LINUX_BATADV_PACKET_H_ 0009 0010 #include <asm/byteorder.h> 0011 #include <linux/if_ether.h> 0012 #include <linux/types.h> 0013 0014 /** 0015 * batadv_tp_is_error() - Check throughput meter return code for error 0016 * @n: throughput meter return code 0017 * 0018 * Return: 0 when not error was detected, != 0 otherwise 0019 */ 0020 #define batadv_tp_is_error(n) ((__u8)(n) > 127 ? 1 : 0) 0021 0022 /** 0023 * enum batadv_packettype - types for batman-adv encapsulated packets 0024 * @BATADV_IV_OGM: originator messages for B.A.T.M.A.N. IV 0025 * @BATADV_BCAST: broadcast packets carrying broadcast payload 0026 * @BATADV_CODED: network coded packets 0027 * @BATADV_ELP: echo location packets for B.A.T.M.A.N. V 0028 * @BATADV_OGM2: originator messages for B.A.T.M.A.N. V 0029 * 0030 * @BATADV_UNICAST: unicast packets carrying unicast payload traffic 0031 * @BATADV_UNICAST_FRAG: unicast packets carrying a fragment of the original 0032 * payload packet 0033 * @BATADV_UNICAST_4ADDR: unicast packet including the originator address of 0034 * the sender 0035 * @BATADV_ICMP: unicast packet like IP ICMP used for ping or traceroute 0036 * @BATADV_UNICAST_TVLV: unicast packet carrying TVLV containers 0037 */ 0038 enum batadv_packettype { 0039 /* 0x00 - 0x3f: local packets or special rules for handling */ 0040 BATADV_IV_OGM = 0x00, 0041 BATADV_BCAST = 0x01, 0042 BATADV_CODED = 0x02, 0043 BATADV_ELP = 0x03, 0044 BATADV_OGM2 = 0x04, 0045 /* 0x40 - 0x7f: unicast */ 0046 #define BATADV_UNICAST_MIN 0x40 0047 BATADV_UNICAST = 0x40, 0048 BATADV_UNICAST_FRAG = 0x41, 0049 BATADV_UNICAST_4ADDR = 0x42, 0050 BATADV_ICMP = 0x43, 0051 BATADV_UNICAST_TVLV = 0x44, 0052 #define BATADV_UNICAST_MAX 0x7f 0053 /* 0x80 - 0xff: reserved */ 0054 }; 0055 0056 /** 0057 * enum batadv_subtype - packet subtype for unicast4addr 0058 * @BATADV_P_DATA: user payload 0059 * @BATADV_P_DAT_DHT_GET: DHT request message 0060 * @BATADV_P_DAT_DHT_PUT: DHT store message 0061 * @BATADV_P_DAT_CACHE_REPLY: ARP reply generated by DAT 0062 */ 0063 enum batadv_subtype { 0064 BATADV_P_DATA = 0x01, 0065 BATADV_P_DAT_DHT_GET = 0x02, 0066 BATADV_P_DAT_DHT_PUT = 0x03, 0067 BATADV_P_DAT_CACHE_REPLY = 0x04, 0068 }; 0069 0070 /* this file is included by batctl which needs these defines */ 0071 #define BATADV_COMPAT_VERSION 15 0072 0073 /** 0074 * enum batadv_iv_flags - flags used in B.A.T.M.A.N. IV OGM packets 0075 * @BATADV_NOT_BEST_NEXT_HOP: flag is set when the ogm packet is forwarded and 0076 * was previously received from someone other than the best neighbor. 0077 * @BATADV_PRIMARIES_FIRST_HOP: flag unused. 0078 * @BATADV_DIRECTLINK: flag is for the first hop or if rebroadcasted from a 0079 * one hop neighbor on the interface where it was originally received. 0080 */ 0081 enum batadv_iv_flags { 0082 BATADV_NOT_BEST_NEXT_HOP = 1UL << 0, 0083 BATADV_PRIMARIES_FIRST_HOP = 1UL << 1, 0084 BATADV_DIRECTLINK = 1UL << 2, 0085 }; 0086 0087 /** 0088 * enum batadv_icmp_packettype - ICMP message types 0089 * @BATADV_ECHO_REPLY: success reply to BATADV_ECHO_REQUEST 0090 * @BATADV_DESTINATION_UNREACHABLE: failure when route to destination not found 0091 * @BATADV_ECHO_REQUEST: request BATADV_ECHO_REPLY from destination 0092 * @BATADV_TTL_EXCEEDED: error after BATADV_ECHO_REQUEST traversed too many hops 0093 * @BATADV_PARAMETER_PROBLEM: return code for malformed messages 0094 * @BATADV_TP: throughput meter packet 0095 */ 0096 enum batadv_icmp_packettype { 0097 BATADV_ECHO_REPLY = 0, 0098 BATADV_DESTINATION_UNREACHABLE = 3, 0099 BATADV_ECHO_REQUEST = 8, 0100 BATADV_TTL_EXCEEDED = 11, 0101 BATADV_PARAMETER_PROBLEM = 12, 0102 BATADV_TP = 15, 0103 }; 0104 0105 /** 0106 * enum batadv_mcast_flags - flags for multicast capabilities and settings 0107 * @BATADV_MCAST_WANT_ALL_UNSNOOPABLES: we want all packets destined for 0108 * 224.0.0.0/24 or ff02::1 0109 * @BATADV_MCAST_WANT_ALL_IPV4: we want all IPv4 multicast packets 0110 * (both link-local and routable ones) 0111 * @BATADV_MCAST_WANT_ALL_IPV6: we want all IPv6 multicast packets 0112 * (both link-local and routable ones) 0113 * @BATADV_MCAST_WANT_NO_RTR4: we have no IPv4 multicast router and therefore 0114 * only need routable IPv4 multicast packets we signed up for explicitly 0115 * @BATADV_MCAST_WANT_NO_RTR6: we have no IPv6 multicast router and therefore 0116 * only need routable IPv6 multicast packets we signed up for explicitly 0117 */ 0118 enum batadv_mcast_flags { 0119 BATADV_MCAST_WANT_ALL_UNSNOOPABLES = 1UL << 0, 0120 BATADV_MCAST_WANT_ALL_IPV4 = 1UL << 1, 0121 BATADV_MCAST_WANT_ALL_IPV6 = 1UL << 2, 0122 BATADV_MCAST_WANT_NO_RTR4 = 1UL << 3, 0123 BATADV_MCAST_WANT_NO_RTR6 = 1UL << 4, 0124 }; 0125 0126 /* tt data subtypes */ 0127 #define BATADV_TT_DATA_TYPE_MASK 0x0F 0128 0129 /** 0130 * enum batadv_tt_data_flags - flags for tt data tvlv 0131 * @BATADV_TT_OGM_DIFF: TT diff propagated through OGM 0132 * @BATADV_TT_REQUEST: TT request message 0133 * @BATADV_TT_RESPONSE: TT response message 0134 * @BATADV_TT_FULL_TABLE: contains full table to replace existing table 0135 */ 0136 enum batadv_tt_data_flags { 0137 BATADV_TT_OGM_DIFF = 1UL << 0, 0138 BATADV_TT_REQUEST = 1UL << 1, 0139 BATADV_TT_RESPONSE = 1UL << 2, 0140 BATADV_TT_FULL_TABLE = 1UL << 4, 0141 }; 0142 0143 /** 0144 * enum batadv_vlan_flags - flags for the four MSB of any vlan ID field 0145 * @BATADV_VLAN_HAS_TAG: whether the field contains a valid vlan tag or not 0146 */ 0147 enum batadv_vlan_flags { 0148 BATADV_VLAN_HAS_TAG = 1UL << 15, 0149 }; 0150 0151 /** 0152 * enum batadv_bla_claimframe - claim frame types for the bridge loop avoidance 0153 * @BATADV_CLAIM_TYPE_CLAIM: claim of a client mac address 0154 * @BATADV_CLAIM_TYPE_UNCLAIM: unclaim of a client mac address 0155 * @BATADV_CLAIM_TYPE_ANNOUNCE: announcement of backbone with current crc 0156 * @BATADV_CLAIM_TYPE_REQUEST: request of full claim table 0157 * @BATADV_CLAIM_TYPE_LOOPDETECT: mesh-traversing loop detect packet 0158 */ 0159 enum batadv_bla_claimframe { 0160 BATADV_CLAIM_TYPE_CLAIM = 0x00, 0161 BATADV_CLAIM_TYPE_UNCLAIM = 0x01, 0162 BATADV_CLAIM_TYPE_ANNOUNCE = 0x02, 0163 BATADV_CLAIM_TYPE_REQUEST = 0x03, 0164 BATADV_CLAIM_TYPE_LOOPDETECT = 0x04, 0165 }; 0166 0167 /** 0168 * enum batadv_tvlv_type - tvlv type definitions 0169 * @BATADV_TVLV_GW: gateway tvlv 0170 * @BATADV_TVLV_DAT: distributed arp table tvlv 0171 * @BATADV_TVLV_NC: network coding tvlv 0172 * @BATADV_TVLV_TT: translation table tvlv 0173 * @BATADV_TVLV_ROAM: roaming advertisement tvlv 0174 * @BATADV_TVLV_MCAST: multicast capability tvlv 0175 */ 0176 enum batadv_tvlv_type { 0177 BATADV_TVLV_GW = 0x01, 0178 BATADV_TVLV_DAT = 0x02, 0179 BATADV_TVLV_NC = 0x03, 0180 BATADV_TVLV_TT = 0x04, 0181 BATADV_TVLV_ROAM = 0x05, 0182 BATADV_TVLV_MCAST = 0x06, 0183 }; 0184 0185 #pragma pack(2) 0186 /* the destination hardware field in the ARP frame is used to 0187 * transport the claim type and the group id 0188 */ 0189 struct batadv_bla_claim_dst { 0190 __u8 magic[3]; /* FF:43:05 */ 0191 __u8 type; /* bla_claimframe */ 0192 __be16 group; /* group id */ 0193 }; 0194 0195 /** 0196 * struct batadv_ogm_packet - ogm (routing protocol) packet 0197 * @packet_type: batman-adv packet type, part of the general header 0198 * @version: batman-adv protocol version, part of the general header 0199 * @ttl: time to live for this packet, part of the general header 0200 * @flags: contains routing relevant flags - see enum batadv_iv_flags 0201 * @seqno: sequence identification 0202 * @orig: address of the source node 0203 * @prev_sender: address of the previous sender 0204 * @reserved: reserved byte for alignment 0205 * @tq: transmission quality 0206 * @tvlv_len: length of tvlv data following the ogm header 0207 */ 0208 struct batadv_ogm_packet { 0209 __u8 packet_type; 0210 __u8 version; 0211 __u8 ttl; 0212 __u8 flags; 0213 __be32 seqno; 0214 __u8 orig[ETH_ALEN]; 0215 __u8 prev_sender[ETH_ALEN]; 0216 __u8 reserved; 0217 __u8 tq; 0218 __be16 tvlv_len; 0219 }; 0220 0221 #define BATADV_OGM_HLEN sizeof(struct batadv_ogm_packet) 0222 0223 /** 0224 * struct batadv_ogm2_packet - ogm2 (routing protocol) packet 0225 * @packet_type: batman-adv packet type, part of the general header 0226 * @version: batman-adv protocol version, part of the general header 0227 * @ttl: time to live for this packet, part of the general header 0228 * @flags: reserved for routing relevant flags - currently always 0 0229 * @seqno: sequence number 0230 * @orig: originator mac address 0231 * @tvlv_len: length of the appended tvlv buffer (in bytes) 0232 * @throughput: the currently flooded path throughput 0233 */ 0234 struct batadv_ogm2_packet { 0235 __u8 packet_type; 0236 __u8 version; 0237 __u8 ttl; 0238 __u8 flags; 0239 __be32 seqno; 0240 __u8 orig[ETH_ALEN]; 0241 __be16 tvlv_len; 0242 __be32 throughput; 0243 }; 0244 0245 #define BATADV_OGM2_HLEN sizeof(struct batadv_ogm2_packet) 0246 0247 /** 0248 * struct batadv_elp_packet - elp (neighbor discovery) packet 0249 * @packet_type: batman-adv packet type, part of the general header 0250 * @version: batman-adv protocol version, part of the general header 0251 * @orig: originator mac address 0252 * @seqno: sequence number 0253 * @elp_interval: currently used ELP sending interval in ms 0254 */ 0255 struct batadv_elp_packet { 0256 __u8 packet_type; 0257 __u8 version; 0258 __u8 orig[ETH_ALEN]; 0259 __be32 seqno; 0260 __be32 elp_interval; 0261 }; 0262 0263 #define BATADV_ELP_HLEN sizeof(struct batadv_elp_packet) 0264 0265 /** 0266 * struct batadv_icmp_header - common members among all the ICMP packets 0267 * @packet_type: batman-adv packet type, part of the general header 0268 * @version: batman-adv protocol version, part of the general header 0269 * @ttl: time to live for this packet, part of the general header 0270 * @msg_type: ICMP packet type 0271 * @dst: address of the destination node 0272 * @orig: address of the source node 0273 * @uid: local ICMP socket identifier 0274 * @align: not used - useful for alignment purposes only 0275 * 0276 * This structure is used for ICMP packet parsing only and it is never sent 0277 * over the wire. The alignment field at the end is there to ensure that 0278 * members are padded the same way as they are in real packets. 0279 */ 0280 struct batadv_icmp_header { 0281 __u8 packet_type; 0282 __u8 version; 0283 __u8 ttl; 0284 __u8 msg_type; /* see ICMP message types above */ 0285 __u8 dst[ETH_ALEN]; 0286 __u8 orig[ETH_ALEN]; 0287 __u8 uid; 0288 __u8 align[3]; 0289 }; 0290 0291 /** 0292 * struct batadv_icmp_packet - ICMP packet 0293 * @packet_type: batman-adv packet type, part of the general header 0294 * @version: batman-adv protocol version, part of the general header 0295 * @ttl: time to live for this packet, part of the general header 0296 * @msg_type: ICMP packet type 0297 * @dst: address of the destination node 0298 * @orig: address of the source node 0299 * @uid: local ICMP socket identifier 0300 * @reserved: not used - useful for alignment 0301 * @seqno: ICMP sequence number 0302 */ 0303 struct batadv_icmp_packet { 0304 __u8 packet_type; 0305 __u8 version; 0306 __u8 ttl; 0307 __u8 msg_type; /* see ICMP message types above */ 0308 __u8 dst[ETH_ALEN]; 0309 __u8 orig[ETH_ALEN]; 0310 __u8 uid; 0311 __u8 reserved; 0312 __be16 seqno; 0313 }; 0314 0315 /** 0316 * struct batadv_icmp_tp_packet - ICMP TP Meter packet 0317 * @packet_type: batman-adv packet type, part of the general header 0318 * @version: batman-adv protocol version, part of the general header 0319 * @ttl: time to live for this packet, part of the general header 0320 * @msg_type: ICMP packet type 0321 * @dst: address of the destination node 0322 * @orig: address of the source node 0323 * @uid: local ICMP socket identifier 0324 * @subtype: TP packet subtype (see batadv_icmp_tp_subtype) 0325 * @session: TP session identifier 0326 * @seqno: the TP sequence number 0327 * @timestamp: time when the packet has been sent. This value is filled in a 0328 * TP_MSG and echoed back in the next TP_ACK so that the sender can compute the 0329 * RTT. Since it is read only by the host which wrote it, there is no need to 0330 * store it using network order 0331 */ 0332 struct batadv_icmp_tp_packet { 0333 __u8 packet_type; 0334 __u8 version; 0335 __u8 ttl; 0336 __u8 msg_type; /* see ICMP message types above */ 0337 __u8 dst[ETH_ALEN]; 0338 __u8 orig[ETH_ALEN]; 0339 __u8 uid; 0340 __u8 subtype; 0341 __u8 session[2]; 0342 __be32 seqno; 0343 __be32 timestamp; 0344 }; 0345 0346 /** 0347 * enum batadv_icmp_tp_subtype - ICMP TP Meter packet subtypes 0348 * @BATADV_TP_MSG: Msg from sender to receiver 0349 * @BATADV_TP_ACK: acknowledgment from receiver to sender 0350 */ 0351 enum batadv_icmp_tp_subtype { 0352 BATADV_TP_MSG = 0, 0353 BATADV_TP_ACK, 0354 }; 0355 0356 #define BATADV_RR_LEN 16 0357 0358 /** 0359 * struct batadv_icmp_packet_rr - ICMP RouteRecord packet 0360 * @packet_type: batman-adv packet type, part of the general header 0361 * @version: batman-adv protocol version, part of the general header 0362 * @ttl: time to live for this packet, part of the general header 0363 * @msg_type: ICMP packet type 0364 * @dst: address of the destination node 0365 * @orig: address of the source node 0366 * @uid: local ICMP socket identifier 0367 * @rr_cur: number of entries the rr array 0368 * @seqno: ICMP sequence number 0369 * @rr: route record array 0370 */ 0371 struct batadv_icmp_packet_rr { 0372 __u8 packet_type; 0373 __u8 version; 0374 __u8 ttl; 0375 __u8 msg_type; /* see ICMP message types above */ 0376 __u8 dst[ETH_ALEN]; 0377 __u8 orig[ETH_ALEN]; 0378 __u8 uid; 0379 __u8 rr_cur; 0380 __be16 seqno; 0381 __u8 rr[BATADV_RR_LEN][ETH_ALEN]; 0382 }; 0383 0384 #define BATADV_ICMP_MAX_PACKET_SIZE sizeof(struct batadv_icmp_packet_rr) 0385 0386 /* All packet headers in front of an ethernet header have to be completely 0387 * divisible by 2 but not by 4 to make the payload after the ethernet 0388 * header again 4 bytes boundary aligned. 0389 * 0390 * A packing of 2 is necessary to avoid extra padding at the end of the struct 0391 * caused by a structure member which is larger than two bytes. Otherwise 0392 * the structure would not fulfill the previously mentioned rule to avoid the 0393 * misalignment of the payload after the ethernet header. It may also lead to 0394 * leakage of information when the padding it not initialized before sending. 0395 */ 0396 0397 /** 0398 * struct batadv_unicast_packet - unicast packet for network payload 0399 * @packet_type: batman-adv packet type, part of the general header 0400 * @version: batman-adv protocol version, part of the general header 0401 * @ttl: time to live for this packet, part of the general header 0402 * @ttvn: translation table version number 0403 * @dest: originator destination of the unicast packet 0404 */ 0405 struct batadv_unicast_packet { 0406 __u8 packet_type; 0407 __u8 version; 0408 __u8 ttl; 0409 __u8 ttvn; /* destination translation table version number */ 0410 __u8 dest[ETH_ALEN]; 0411 /* "4 bytes boundary + 2 bytes" long to make the payload after the 0412 * following ethernet header again 4 bytes boundary aligned 0413 */ 0414 }; 0415 0416 /** 0417 * struct batadv_unicast_4addr_packet - extended unicast packet 0418 * @u: common unicast packet header 0419 * @src: address of the source 0420 * @subtype: packet subtype 0421 * @reserved: reserved byte for alignment 0422 */ 0423 struct batadv_unicast_4addr_packet { 0424 struct batadv_unicast_packet u; 0425 __u8 src[ETH_ALEN]; 0426 __u8 subtype; 0427 __u8 reserved; 0428 /* "4 bytes boundary + 2 bytes" long to make the payload after the 0429 * following ethernet header again 4 bytes boundary aligned 0430 */ 0431 }; 0432 0433 /** 0434 * struct batadv_frag_packet - fragmented packet 0435 * @packet_type: batman-adv packet type, part of the general header 0436 * @version: batman-adv protocol version, part of the general header 0437 * @ttl: time to live for this packet, part of the general header 0438 * @dest: final destination used when routing fragments 0439 * @orig: originator of the fragment used when merging the packet 0440 * @no: fragment number within this sequence 0441 * @priority: priority of frame, from ToS IP precedence or 802.1p 0442 * @reserved: reserved byte for alignment 0443 * @seqno: sequence identification 0444 * @total_size: size of the merged packet 0445 */ 0446 struct batadv_frag_packet { 0447 __u8 packet_type; 0448 __u8 version; /* batman version field */ 0449 __u8 ttl; 0450 #if defined(__BIG_ENDIAN_BITFIELD) 0451 __u8 no:4; 0452 __u8 priority:3; 0453 __u8 reserved:1; 0454 #elif defined(__LITTLE_ENDIAN_BITFIELD) 0455 __u8 reserved:1; 0456 __u8 priority:3; 0457 __u8 no:4; 0458 #else 0459 #error "unknown bitfield endianness" 0460 #endif 0461 __u8 dest[ETH_ALEN]; 0462 __u8 orig[ETH_ALEN]; 0463 __be16 seqno; 0464 __be16 total_size; 0465 }; 0466 0467 /** 0468 * struct batadv_bcast_packet - broadcast packet for network payload 0469 * @packet_type: batman-adv packet type, part of the general header 0470 * @version: batman-adv protocol version, part of the general header 0471 * @ttl: time to live for this packet, part of the general header 0472 * @reserved: reserved byte for alignment 0473 * @seqno: sequence identification 0474 * @orig: originator of the broadcast packet 0475 */ 0476 struct batadv_bcast_packet { 0477 __u8 packet_type; 0478 __u8 version; /* batman version field */ 0479 __u8 ttl; 0480 __u8 reserved; 0481 __be32 seqno; 0482 __u8 orig[ETH_ALEN]; 0483 /* "4 bytes boundary + 2 bytes" long to make the payload after the 0484 * following ethernet header again 4 bytes boundary aligned 0485 */ 0486 }; 0487 0488 /** 0489 * struct batadv_coded_packet - network coded packet 0490 * @packet_type: batman-adv packet type, part of the general header 0491 * @version: batman-adv protocol version, part of the general header 0492 * @ttl: time to live for this packet, part of the general header 0493 * @first_source: original source of first included packet 0494 * @first_orig_dest: original destination of first included packet 0495 * @first_crc: checksum of first included packet 0496 * @first_ttvn: tt-version number of first included packet 0497 * @second_ttl: ttl of second packet 0498 * @second_dest: second receiver of this coded packet 0499 * @second_source: original source of second included packet 0500 * @second_orig_dest: original destination of second included packet 0501 * @second_crc: checksum of second included packet 0502 * @second_ttvn: tt version number of second included packet 0503 * @coded_len: length of network coded part of the payload 0504 */ 0505 struct batadv_coded_packet { 0506 __u8 packet_type; 0507 __u8 version; /* batman version field */ 0508 __u8 ttl; 0509 __u8 first_ttvn; 0510 /* __u8 first_dest[ETH_ALEN]; - saved in mac header destination */ 0511 __u8 first_source[ETH_ALEN]; 0512 __u8 first_orig_dest[ETH_ALEN]; 0513 __be32 first_crc; 0514 __u8 second_ttl; 0515 __u8 second_ttvn; 0516 __u8 second_dest[ETH_ALEN]; 0517 __u8 second_source[ETH_ALEN]; 0518 __u8 second_orig_dest[ETH_ALEN]; 0519 __be32 second_crc; 0520 __be16 coded_len; 0521 }; 0522 0523 /** 0524 * struct batadv_unicast_tvlv_packet - generic unicast packet with tvlv payload 0525 * @packet_type: batman-adv packet type, part of the general header 0526 * @version: batman-adv protocol version, part of the general header 0527 * @ttl: time to live for this packet, part of the general header 0528 * @reserved: reserved field (for packet alignment) 0529 * @src: address of the source 0530 * @dst: address of the destination 0531 * @tvlv_len: length of tvlv data following the unicast tvlv header 0532 * @align: 2 bytes to align the header to a 4 byte boundary 0533 */ 0534 struct batadv_unicast_tvlv_packet { 0535 __u8 packet_type; 0536 __u8 version; /* batman version field */ 0537 __u8 ttl; 0538 __u8 reserved; 0539 __u8 dst[ETH_ALEN]; 0540 __u8 src[ETH_ALEN]; 0541 __be16 tvlv_len; 0542 __u16 align; 0543 }; 0544 0545 /** 0546 * struct batadv_tvlv_hdr - base tvlv header struct 0547 * @type: tvlv container type (see batadv_tvlv_type) 0548 * @version: tvlv container version 0549 * @len: tvlv container length 0550 */ 0551 struct batadv_tvlv_hdr { 0552 __u8 type; 0553 __u8 version; 0554 __be16 len; 0555 }; 0556 0557 /** 0558 * struct batadv_tvlv_gateway_data - gateway data propagated through gw tvlv 0559 * container 0560 * @bandwidth_down: advertised uplink download bandwidth 0561 * @bandwidth_up: advertised uplink upload bandwidth 0562 */ 0563 struct batadv_tvlv_gateway_data { 0564 __be32 bandwidth_down; 0565 __be32 bandwidth_up; 0566 }; 0567 0568 /** 0569 * struct batadv_tvlv_tt_data - tt data propagated through the tt tvlv container 0570 * @flags: translation table flags (see batadv_tt_data_flags) 0571 * @ttvn: translation table version number 0572 * @num_vlan: number of announced VLANs. In the TVLV this struct is followed by 0573 * one batadv_tvlv_tt_vlan_data object per announced vlan 0574 */ 0575 struct batadv_tvlv_tt_data { 0576 __u8 flags; 0577 __u8 ttvn; 0578 __be16 num_vlan; 0579 }; 0580 0581 /** 0582 * struct batadv_tvlv_tt_vlan_data - vlan specific tt data propagated through 0583 * the tt tvlv container 0584 * @crc: crc32 checksum of the entries belonging to this vlan 0585 * @vid: vlan identifier 0586 * @reserved: unused, useful for alignment purposes 0587 */ 0588 struct batadv_tvlv_tt_vlan_data { 0589 __be32 crc; 0590 __be16 vid; 0591 __u16 reserved; 0592 }; 0593 0594 /** 0595 * struct batadv_tvlv_tt_change - translation table diff data 0596 * @flags: status indicators concerning the non-mesh client (see 0597 * batadv_tt_client_flags) 0598 * @reserved: reserved field - useful for alignment purposes only 0599 * @addr: mac address of non-mesh client that triggered this tt change 0600 * @vid: VLAN identifier 0601 */ 0602 struct batadv_tvlv_tt_change { 0603 __u8 flags; 0604 __u8 reserved[3]; 0605 __u8 addr[ETH_ALEN]; 0606 __be16 vid; 0607 }; 0608 0609 /** 0610 * struct batadv_tvlv_roam_adv - roaming advertisement 0611 * @client: mac address of roaming client 0612 * @vid: VLAN identifier 0613 */ 0614 struct batadv_tvlv_roam_adv { 0615 __u8 client[ETH_ALEN]; 0616 __be16 vid; 0617 }; 0618 0619 /** 0620 * struct batadv_tvlv_mcast_data - payload of a multicast tvlv 0621 * @flags: multicast flags announced by the orig node 0622 * @reserved: reserved field 0623 */ 0624 struct batadv_tvlv_mcast_data { 0625 __u8 flags; 0626 __u8 reserved[3]; 0627 }; 0628 0629 #pragma pack() 0630 0631 #endif /* _UAPI_LINUX_BATADV_PACKET_H_ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |