27
27
28
28
#define BATADV_NL_NAME "batadv"
29
29
30
+ #define BATADV_NL_MCAST_GROUP_CONFIG "config"
30
31
#define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter"
31
32
32
33
/**
@@ -138,6 +139,20 @@ enum batadv_mcast_flags_priv {
138
139
BATADV_MCAST_FLAGS_QUERIER_IPV6_SHADOWING = (1 << 4 ),
139
140
};
140
141
142
+ /**
143
+ * enum batadv_gw_modes - gateway mode of node
144
+ */
145
+ enum batadv_gw_modes {
146
+ /** @BATADV_GW_MODE_OFF: gw mode disabled */
147
+ BATADV_GW_MODE_OFF ,
148
+
149
+ /** @BATADV_GW_MODE_CLIENT: send DHCP requests to gw servers */
150
+ BATADV_GW_MODE_CLIENT ,
151
+
152
+ /** @BATADV_GW_MODE_SERVER: announce itself as gatway server */
153
+ BATADV_GW_MODE_SERVER ,
154
+ };
155
+
141
156
/**
142
157
* enum batadv_nl_attrs - batman-adv netlink attributes
143
158
*/
@@ -344,6 +359,138 @@ enum batadv_nl_attrs {
344
359
*/
345
360
BATADV_ATTR_MCAST_FLAGS_PRIV ,
346
361
362
+ /**
363
+ * @BATADV_ATTR_VLANID: VLAN id on top of soft interface
364
+ */
365
+ BATADV_ATTR_VLANID ,
366
+
367
+ /**
368
+ * @BATADV_ATTR_AGGREGATED_OGMS_ENABLED: whether the batman protocol
369
+ * messages of the mesh interface shall be aggregated or not.
370
+ */
371
+ BATADV_ATTR_AGGREGATED_OGMS_ENABLED ,
372
+
373
+ /**
374
+ * @BATADV_ATTR_AP_ISOLATION_ENABLED: whether the data traffic going
375
+ * from a wireless client to another wireless client will be silently
376
+ * dropped.
377
+ */
378
+ BATADV_ATTR_AP_ISOLATION_ENABLED ,
379
+
380
+ /**
381
+ * @BATADV_ATTR_ISOLATION_MARK: the isolation mark which is used to
382
+ * classify clients as "isolated" by the Extended Isolation feature.
383
+ */
384
+ BATADV_ATTR_ISOLATION_MARK ,
385
+
386
+ /**
387
+ * @BATADV_ATTR_ISOLATION_MASK: the isolation (bit)mask which is used to
388
+ * classify clients as "isolated" by the Extended Isolation feature.
389
+ */
390
+ BATADV_ATTR_ISOLATION_MASK ,
391
+
392
+ /**
393
+ * @BATADV_ATTR_BONDING_ENABLED: whether the data traffic going through
394
+ * the mesh will be sent using multiple interfaces at the same time.
395
+ */
396
+ BATADV_ATTR_BONDING_ENABLED ,
397
+
398
+ /**
399
+ * @BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED: whether the bridge loop
400
+ * avoidance feature is enabled. This feature detects and avoids loops
401
+ * between the mesh and devices bridged with the soft interface
402
+ */
403
+ BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED ,
404
+
405
+ /**
406
+ * @BATADV_ATTR_DISTRIBUTED_ARP_TABLE_ENABLED: whether the distributed
407
+ * arp table feature is enabled. This feature uses a distributed hash
408
+ * table to answer ARP requests without flooding the request through
409
+ * the whole mesh.
410
+ */
411
+ BATADV_ATTR_DISTRIBUTED_ARP_TABLE_ENABLED ,
412
+
413
+ /**
414
+ * @BATADV_ATTR_FRAGMENTATION_ENABLED: whether the data traffic going
415
+ * through the mesh will be fragmented or silently discarded if the
416
+ * packet size exceeds the outgoing interface MTU.
417
+ */
418
+ BATADV_ATTR_FRAGMENTATION_ENABLED ,
419
+
420
+ /**
421
+ * @BATADV_ATTR_GW_BANDWIDTH_DOWN: defines the download bandwidth which
422
+ * is propagated by this node if %BATADV_ATTR_GW_BANDWIDTH_MODE was set
423
+ * to 'server'.
424
+ */
425
+ BATADV_ATTR_GW_BANDWIDTH_DOWN ,
426
+
427
+ /**
428
+ * @BATADV_ATTR_GW_BANDWIDTH_UP: defines the upload bandwidth which
429
+ * is propagated by this node if %BATADV_ATTR_GW_BANDWIDTH_MODE was set
430
+ * to 'server'.
431
+ */
432
+ BATADV_ATTR_GW_BANDWIDTH_UP ,
433
+
434
+ /**
435
+ * @BATADV_ATTR_GW_MODE: defines the state of the gateway features.
436
+ * Possible values are specified in enum batadv_gw_modes
437
+ */
438
+ BATADV_ATTR_GW_MODE ,
439
+
440
+ /**
441
+ * @BATADV_ATTR_GW_SEL_CLASS: defines the selection criteria this node
442
+ * will use to choose a gateway if gw_mode was set to 'client'.
443
+ */
444
+ BATADV_ATTR_GW_SEL_CLASS ,
445
+
446
+ /**
447
+ * @BATADV_ATTR_HOP_PENALTY: defines the penalty which will be applied
448
+ * to an originator message's tq-field on every hop.
449
+ */
450
+ BATADV_ATTR_HOP_PENALTY ,
451
+
452
+ /**
453
+ * @BATADV_ATTR_LOG_LEVEL: bitmask with to define which debug messages
454
+ * should be send to the debug log/trace ring buffer
455
+ */
456
+ BATADV_ATTR_LOG_LEVEL ,
457
+
458
+ /**
459
+ * @BATADV_ATTR_MULTICAST_FORCEFLOOD_ENABLED: whether multicast
460
+ * optimizations should be replaced by simple broadcast-like flooding
461
+ * of multicast packets. If set to non-zero then all nodes in the mesh
462
+ * are going to use classic flooding for any multicast packet with no
463
+ * optimizations.
464
+ */
465
+ BATADV_ATTR_MULTICAST_FORCEFLOOD_ENABLED ,
466
+
467
+ /**
468
+ * @BATADV_ATTR_NETWORK_CODING_ENABLED: whether Network Coding (using
469
+ * some magic to send fewer wifi packets but still the same content) is
470
+ * enabled or not.
471
+ */
472
+ BATADV_ATTR_NETWORK_CODING_ENABLED ,
473
+
474
+ /**
475
+ * @BATADV_ATTR_ORIG_INTERVAL: defines the interval in milliseconds in
476
+ * which batman sends its protocol messages.
477
+ */
478
+ BATADV_ATTR_ORIG_INTERVAL ,
479
+
480
+ /**
481
+ * @BATADV_ATTR_ELP_INTERVAL: defines the interval in milliseconds in
482
+ * which batman emits probing packets for neighbor sensing (ELP).
483
+ */
484
+ BATADV_ATTR_ELP_INTERVAL ,
485
+
486
+ /**
487
+ * @BATADV_ATTR_THROUGHPUT_OVERRIDE: defines the throughput value to be
488
+ * used by B.A.T.M.A.N. V when estimating the link throughput using
489
+ * this interface. If the value is set to 0 then batman-adv will try to
490
+ * estimate the throughput by itself.
491
+ */
492
+ BATADV_ATTR_THROUGHPUT_OVERRIDE ,
493
+
347
494
/* add attributes above here, update the policy in netlink.c */
348
495
349
496
/**
@@ -372,10 +519,14 @@ enum batadv_nl_commands {
372
519
BATADV_CMD_UNSPEC ,
373
520
374
521
/**
375
- * @BATADV_CMD_GET_MESH_INFO: Query basic information about batman-adv
376
- * device
522
+ * @BATADV_CMD_GET_MESH: Get attributes from softif/mesh
523
+ */
524
+ BATADV_CMD_GET_MESH ,
525
+
526
+ /**
527
+ * @BATADV_CMD_GET_MESH_INFO: Alias for @BATADV_CMD_GET_MESH
377
528
*/
378
- BATADV_CMD_GET_MESH_INFO ,
529
+ BATADV_CMD_GET_MESH_INFO = BATADV_CMD_GET_MESH ,
379
530
380
531
/**
381
532
* @BATADV_CMD_TP_METER: Start a tp meter session
@@ -393,9 +544,15 @@ enum batadv_nl_commands {
393
544
BATADV_CMD_GET_ROUTING_ALGOS ,
394
545
395
546
/**
396
- * @BATADV_CMD_GET_HARDIFS: Query list of hard interfaces
547
+ * @BATADV_CMD_GET_HARDIF: Get attributes from a hardif of the
548
+ * current softif
397
549
*/
398
- BATADV_CMD_GET_HARDIFS ,
550
+ BATADV_CMD_GET_HARDIF ,
551
+
552
+ /**
553
+ * @BATADV_CMD_GET_HARDIFS: Alias for @BATADV_CMD_GET_HARDIF
554
+ */
555
+ BATADV_CMD_GET_HARDIFS = BATADV_CMD_GET_HARDIF ,
399
556
400
557
/**
401
558
* @BATADV_CMD_GET_TRANSTABLE_LOCAL: Query list of local translations
@@ -443,6 +600,29 @@ enum batadv_nl_commands {
443
600
*/
444
601
BATADV_CMD_GET_MCAST_FLAGS ,
445
602
603
+ /**
604
+ * @BATADV_CMD_SET_MESH: Set attributes for softif/mesh
605
+ */
606
+ BATADV_CMD_SET_MESH ,
607
+
608
+ /**
609
+ * @BATADV_CMD_SET_HARDIF: Set attributes for hardif of the
610
+ * current softif
611
+ */
612
+ BATADV_CMD_SET_HARDIF ,
613
+
614
+ /**
615
+ * @BATADV_CMD_GET_VLAN: Get attributes from a VLAN of the
616
+ * current softif
617
+ */
618
+ BATADV_CMD_GET_VLAN ,
619
+
620
+ /**
621
+ * @BATADV_CMD_SET_VLAN: Set attributes for VLAN of the
622
+ * current softif
623
+ */
624
+ BATADV_CMD_SET_VLAN ,
625
+
446
626
/* add new commands above here */
447
627
448
628
/**
0 commit comments