batman_robin/model/command.rs
1/// BATMAN-adv supported generic netlink commands.
2///
3/// These commands correspond to the BATMAN-adv netlink operations
4/// defined in `linux/uapi/batman_adv.h`.
5#[repr(u8)]
6#[derive(Debug, Clone, Copy, PartialEq, Eq)]
7pub enum Command {
8 /// Unspecified / no operation.
9 BatadvCmdUnspec = 0,
10
11 /// Get information about the mesh interface.
12 BatadvCmdGetMeshInfo = 1,
13
14 /// Start a throughput measurement (TP meter).
15 BatadvCmdTpMeter = 2,
16
17 /// Cancel an ongoing throughput measurement.
18 BatadvCmdTpMeterCancel = 3,
19
20 /// Get available routing algorithms.
21 BatadvCmdGetRoutingAlgos = 4,
22
23 /// Get hard interface (physical interface) information.
24 BatadvCmdGetHardif = 5,
25
26 /// Get the local translation table (local clients).
27 BatadvCmdGetTranstableLocal = 6,
28
29 /// Get the global translation table (originators from other nodes).
30 BatadvCmdGetTranstableGlobal = 7,
31
32 /// Get originator nodes.
33 BatadvCmdGetOriginators = 8,
34
35 /// Get neighboring nodes.
36 BatadvCmdGetNeighbors = 9,
37
38 /// Get gateway information.
39 BatadvCmdGetGateways = 10,
40
41 /// Get B.A.T.M.A.N. Loop Avoidance claims.
42 BatadvCmdGetBlaClaim = 11,
43
44 /// Get B.A.T.M.A.N. Loop Avoidance backbone status.
45 BatadvCmdGetBlaBackbone = 12,
46
47 /// Get datagram cache information.
48 BatadvCmdGetDatCache = 13,
49
50 /// Get multicast flags.
51 BatadvCmdGetMcastFlags = 14,
52
53 /// Set mesh interface parameters.
54 BatadvCmdSetMesh = 15,
55
56 /// Set hard interface parameters.
57 BatadvCmdSetHardif = 16,
58
59 /// Get VLAN settings.
60 BatadvCmdGetVlan = 17,
61
62 /// Set VLAN settings.
63 BatadvCmdSetVlan = 18,
64}
65
66impl From<Command> for u8 {
67 fn from(c: Command) -> Self {
68 c as u8
69 }
70}