Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: MIT */
0002 /* Copyright (C) B.A.T.M.A.N. contributors:
0003  *
0004  * Matthias Schiffer
0005  */
0006 
0007 #ifndef _UAPI_LINUX_BATMAN_ADV_H_
0008 #define _UAPI_LINUX_BATMAN_ADV_H_
0009 
0010 #define BATADV_NL_NAME "batadv"
0011 
0012 #define BATADV_NL_MCAST_GROUP_CONFIG    "config"
0013 #define BATADV_NL_MCAST_GROUP_TPMETER   "tpmeter"
0014 
0015 /**
0016  * enum batadv_tt_client_flags - TT client specific flags
0017  *
0018  * Bits from 0 to 7 are called _remote flags_ because they are sent on the wire.
0019  * Bits from 8 to 15 are called _local flags_ because they are used for local
0020  * computations only.
0021  *
0022  * Bits from 4 to 7 - a subset of remote flags - are ensured to be in sync with
0023  * the other nodes in the network. To achieve this goal these flags are included
0024  * in the TT CRC computation.
0025  */
0026 enum batadv_tt_client_flags {
0027     /**
0028      * @BATADV_TT_CLIENT_DEL: the client has to be deleted from the table
0029      */
0030     BATADV_TT_CLIENT_DEL     = (1 << 0),
0031 
0032     /**
0033      * @BATADV_TT_CLIENT_ROAM: the client roamed to/from another node and
0034      * the new update telling its new real location has not been
0035      * received/sent yet
0036      */
0037     BATADV_TT_CLIENT_ROAM    = (1 << 1),
0038 
0039     /**
0040      * @BATADV_TT_CLIENT_WIFI: this client is connected through a wifi
0041      * interface. This information is used by the "AP Isolation" feature
0042      */
0043     BATADV_TT_CLIENT_WIFI    = (1 << 4),
0044 
0045     /**
0046      * @BATADV_TT_CLIENT_ISOLA: this client is considered "isolated". This
0047      * information is used by the Extended Isolation feature
0048      */
0049     BATADV_TT_CLIENT_ISOLA   = (1 << 5),
0050 
0051     /**
0052      * @BATADV_TT_CLIENT_NOPURGE: this client should never be removed from
0053      * the table
0054      */
0055     BATADV_TT_CLIENT_NOPURGE = (1 << 8),
0056 
0057     /**
0058      * @BATADV_TT_CLIENT_NEW: this client has been added to the local table
0059      * but has not been announced yet
0060      */
0061     BATADV_TT_CLIENT_NEW     = (1 << 9),
0062 
0063     /**
0064      * @BATADV_TT_CLIENT_PENDING: this client is marked for removal but it
0065      * is kept in the table for one more originator interval for consistency
0066      * purposes
0067      */
0068     BATADV_TT_CLIENT_PENDING = (1 << 10),
0069 
0070     /**
0071      * @BATADV_TT_CLIENT_TEMP: this global client has been detected to be
0072      * part of the network but no node has already announced it
0073      */
0074     BATADV_TT_CLIENT_TEMP    = (1 << 11),
0075 };
0076 
0077 /**
0078  * enum batadv_mcast_flags_priv - Private, own multicast flags
0079  *
0080  * These are internal, multicast related flags. Currently they describe certain
0081  * multicast related attributes of the segment this originator bridges into the
0082  * mesh.
0083  *
0084  * Those attributes are used to determine the public multicast flags this
0085  * originator is going to announce via TT.
0086  *
0087  * For netlink, if BATADV_MCAST_FLAGS_BRIDGED is unset then all querier
0088  * related flags are undefined.
0089  */
0090 enum batadv_mcast_flags_priv {
0091     /**
0092      * @BATADV_MCAST_FLAGS_BRIDGED: There is a bridge on top of the mesh
0093      * interface.
0094      */
0095     BATADV_MCAST_FLAGS_BRIDGED          = (1 << 0),
0096 
0097     /**
0098      * @BATADV_MCAST_FLAGS_QUERIER_IPV4_EXISTS: Whether an IGMP querier
0099      * exists in the mesh
0100      */
0101     BATADV_MCAST_FLAGS_QUERIER_IPV4_EXISTS      = (1 << 1),
0102 
0103     /**
0104      * @BATADV_MCAST_FLAGS_QUERIER_IPV6_EXISTS: Whether an MLD querier
0105      * exists in the mesh
0106      */
0107     BATADV_MCAST_FLAGS_QUERIER_IPV6_EXISTS      = (1 << 2),
0108 
0109     /**
0110      * @BATADV_MCAST_FLAGS_QUERIER_IPV4_SHADOWING: If an IGMP querier
0111      * exists, whether it is potentially shadowing multicast listeners
0112      * (i.e. querier is behind our own bridge segment)
0113      */
0114     BATADV_MCAST_FLAGS_QUERIER_IPV4_SHADOWING   = (1 << 3),
0115 
0116     /**
0117      * @BATADV_MCAST_FLAGS_QUERIER_IPV6_SHADOWING: If an MLD querier
0118      * exists, whether it is potentially shadowing multicast listeners
0119      * (i.e. querier is behind our own bridge segment)
0120      */
0121     BATADV_MCAST_FLAGS_QUERIER_IPV6_SHADOWING   = (1 << 4),
0122 };
0123 
0124 /**
0125  * enum batadv_gw_modes - gateway mode of node
0126  */
0127 enum batadv_gw_modes {
0128     /** @BATADV_GW_MODE_OFF: gw mode disabled */
0129     BATADV_GW_MODE_OFF,
0130 
0131     /** @BATADV_GW_MODE_CLIENT: send DHCP requests to gw servers */
0132     BATADV_GW_MODE_CLIENT,
0133 
0134     /** @BATADV_GW_MODE_SERVER: announce itself as gateway server */
0135     BATADV_GW_MODE_SERVER,
0136 };
0137 
0138 /**
0139  * enum batadv_nl_attrs - batman-adv netlink attributes
0140  */
0141 enum batadv_nl_attrs {
0142     /**
0143      * @BATADV_ATTR_UNSPEC: unspecified attribute to catch errors
0144      */
0145     BATADV_ATTR_UNSPEC,
0146 
0147     /**
0148      * @BATADV_ATTR_VERSION: batman-adv version string
0149      */
0150     BATADV_ATTR_VERSION,
0151 
0152     /**
0153      * @BATADV_ATTR_ALGO_NAME: name of routing algorithm
0154      */
0155     BATADV_ATTR_ALGO_NAME,
0156 
0157     /**
0158      * @BATADV_ATTR_MESH_IFINDEX: index of the batman-adv interface
0159      */
0160     BATADV_ATTR_MESH_IFINDEX,
0161 
0162     /**
0163      * @BATADV_ATTR_MESH_IFNAME: name of the batman-adv interface
0164      */
0165     BATADV_ATTR_MESH_IFNAME,
0166 
0167     /**
0168      * @BATADV_ATTR_MESH_ADDRESS: mac address of the batman-adv interface
0169      */
0170     BATADV_ATTR_MESH_ADDRESS,
0171 
0172     /**
0173      * @BATADV_ATTR_HARD_IFINDEX: index of the non-batman-adv interface
0174      */
0175     BATADV_ATTR_HARD_IFINDEX,
0176 
0177     /**
0178      * @BATADV_ATTR_HARD_IFNAME: name of the non-batman-adv interface
0179      */
0180     BATADV_ATTR_HARD_IFNAME,
0181 
0182     /**
0183      * @BATADV_ATTR_HARD_ADDRESS: mac address of the non-batman-adv
0184      * interface
0185      */
0186     BATADV_ATTR_HARD_ADDRESS,
0187 
0188     /**
0189      * @BATADV_ATTR_ORIG_ADDRESS: originator mac address
0190      */
0191     BATADV_ATTR_ORIG_ADDRESS,
0192 
0193     /**
0194      * @BATADV_ATTR_TPMETER_RESULT: result of run (see
0195      * batadv_tp_meter_status)
0196      */
0197     BATADV_ATTR_TPMETER_RESULT,
0198 
0199     /**
0200      * @BATADV_ATTR_TPMETER_TEST_TIME: time (msec) the run took
0201      */
0202     BATADV_ATTR_TPMETER_TEST_TIME,
0203 
0204     /**
0205      * @BATADV_ATTR_TPMETER_BYTES: amount of acked bytes during run
0206      */
0207     BATADV_ATTR_TPMETER_BYTES,
0208 
0209     /**
0210      * @BATADV_ATTR_TPMETER_COOKIE: session cookie to match tp_meter session
0211      */
0212     BATADV_ATTR_TPMETER_COOKIE,
0213 
0214     /**
0215      * @BATADV_ATTR_PAD: attribute used for padding for 64-bit alignment
0216      */
0217     BATADV_ATTR_PAD,
0218 
0219     /**
0220      * @BATADV_ATTR_ACTIVE: Flag indicating if the hard interface is active
0221      */
0222     BATADV_ATTR_ACTIVE,
0223 
0224     /**
0225      * @BATADV_ATTR_TT_ADDRESS: Client MAC address
0226      */
0227     BATADV_ATTR_TT_ADDRESS,
0228 
0229     /**
0230      * @BATADV_ATTR_TT_TTVN: Translation table version
0231      */
0232     BATADV_ATTR_TT_TTVN,
0233 
0234     /**
0235      * @BATADV_ATTR_TT_LAST_TTVN: Previous translation table version
0236      */
0237     BATADV_ATTR_TT_LAST_TTVN,
0238 
0239     /**
0240      * @BATADV_ATTR_TT_CRC32: CRC32 over translation table
0241      */
0242     BATADV_ATTR_TT_CRC32,
0243 
0244     /**
0245      * @BATADV_ATTR_TT_VID: VLAN ID
0246      */
0247     BATADV_ATTR_TT_VID,
0248 
0249     /**
0250      * @BATADV_ATTR_TT_FLAGS: Translation table client flags
0251      */
0252     BATADV_ATTR_TT_FLAGS,
0253 
0254     /**
0255      * @BATADV_ATTR_FLAG_BEST: Flags indicating entry is the best
0256      */
0257     BATADV_ATTR_FLAG_BEST,
0258 
0259     /**
0260      * @BATADV_ATTR_LAST_SEEN_MSECS: Time in milliseconds since last seen
0261      */
0262     BATADV_ATTR_LAST_SEEN_MSECS,
0263 
0264     /**
0265      * @BATADV_ATTR_NEIGH_ADDRESS: Neighbour MAC address
0266      */
0267     BATADV_ATTR_NEIGH_ADDRESS,
0268 
0269     /**
0270      * @BATADV_ATTR_TQ: TQ to neighbour
0271      */
0272     BATADV_ATTR_TQ,
0273 
0274     /**
0275      * @BATADV_ATTR_THROUGHPUT: Estimated throughput to Neighbour
0276      */
0277     BATADV_ATTR_THROUGHPUT,
0278 
0279     /**
0280      * @BATADV_ATTR_BANDWIDTH_UP: Reported uplink bandwidth
0281      */
0282     BATADV_ATTR_BANDWIDTH_UP,
0283 
0284     /**
0285      * @BATADV_ATTR_BANDWIDTH_DOWN: Reported downlink bandwidth
0286      */
0287     BATADV_ATTR_BANDWIDTH_DOWN,
0288 
0289     /**
0290      * @BATADV_ATTR_ROUTER: Gateway router MAC address
0291      */
0292     BATADV_ATTR_ROUTER,
0293 
0294     /**
0295      * @BATADV_ATTR_BLA_OWN: Flag indicating own originator
0296      */
0297     BATADV_ATTR_BLA_OWN,
0298 
0299     /**
0300      * @BATADV_ATTR_BLA_ADDRESS: Bridge loop avoidance claim MAC address
0301      */
0302     BATADV_ATTR_BLA_ADDRESS,
0303 
0304     /**
0305      * @BATADV_ATTR_BLA_VID: BLA VLAN ID
0306      */
0307     BATADV_ATTR_BLA_VID,
0308 
0309     /**
0310      * @BATADV_ATTR_BLA_BACKBONE: BLA gateway originator MAC address
0311      */
0312     BATADV_ATTR_BLA_BACKBONE,
0313 
0314     /**
0315      * @BATADV_ATTR_BLA_CRC: BLA CRC
0316      */
0317     BATADV_ATTR_BLA_CRC,
0318 
0319     /**
0320      * @BATADV_ATTR_DAT_CACHE_IP4ADDRESS: Client IPv4 address
0321      */
0322     BATADV_ATTR_DAT_CACHE_IP4ADDRESS,
0323 
0324     /**
0325      * @BATADV_ATTR_DAT_CACHE_HWADDRESS: Client MAC address
0326      */
0327     BATADV_ATTR_DAT_CACHE_HWADDRESS,
0328 
0329     /**
0330      * @BATADV_ATTR_DAT_CACHE_VID: VLAN ID
0331      */
0332     BATADV_ATTR_DAT_CACHE_VID,
0333 
0334     /**
0335      * @BATADV_ATTR_MCAST_FLAGS: Per originator multicast flags
0336      */
0337     BATADV_ATTR_MCAST_FLAGS,
0338 
0339     /**
0340      * @BATADV_ATTR_MCAST_FLAGS_PRIV: Private, own multicast flags
0341      */
0342     BATADV_ATTR_MCAST_FLAGS_PRIV,
0343 
0344     /**
0345      * @BATADV_ATTR_VLANID: VLAN id on top of soft interface
0346      */
0347     BATADV_ATTR_VLANID,
0348 
0349     /**
0350      * @BATADV_ATTR_AGGREGATED_OGMS_ENABLED: whether the batman protocol
0351      *  messages of the mesh interface shall be aggregated or not.
0352      */
0353     BATADV_ATTR_AGGREGATED_OGMS_ENABLED,
0354 
0355     /**
0356      * @BATADV_ATTR_AP_ISOLATION_ENABLED: whether the data traffic going
0357      *  from a wireless client to another wireless client will be silently
0358      *  dropped.
0359      */
0360     BATADV_ATTR_AP_ISOLATION_ENABLED,
0361 
0362     /**
0363      * @BATADV_ATTR_ISOLATION_MARK: the isolation mark which is used to
0364      *  classify clients as "isolated" by the Extended Isolation feature.
0365      */
0366     BATADV_ATTR_ISOLATION_MARK,
0367 
0368     /**
0369      * @BATADV_ATTR_ISOLATION_MASK: the isolation (bit)mask which is used to
0370      *  classify clients as "isolated" by the Extended Isolation feature.
0371      */
0372     BATADV_ATTR_ISOLATION_MASK,
0373 
0374     /**
0375      * @BATADV_ATTR_BONDING_ENABLED: whether the data traffic going through
0376      *  the mesh will be sent using multiple interfaces at the same time.
0377      */
0378     BATADV_ATTR_BONDING_ENABLED,
0379 
0380     /**
0381      * @BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED: whether the bridge loop
0382      *  avoidance feature is enabled. This feature detects and avoids loops
0383      *  between the mesh and devices bridged with the soft interface
0384      */
0385     BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED,
0386 
0387     /**
0388      * @BATADV_ATTR_DISTRIBUTED_ARP_TABLE_ENABLED: whether the distributed
0389      *  arp table feature is enabled. This feature uses a distributed hash
0390      *  table to answer ARP requests without flooding the request through
0391      *  the whole mesh.
0392      */
0393     BATADV_ATTR_DISTRIBUTED_ARP_TABLE_ENABLED,
0394 
0395     /**
0396      * @BATADV_ATTR_FRAGMENTATION_ENABLED: whether the data traffic going
0397      *  through the mesh will be fragmented or silently discarded if the
0398      *  packet size exceeds the outgoing interface MTU.
0399      */
0400     BATADV_ATTR_FRAGMENTATION_ENABLED,
0401 
0402     /**
0403      * @BATADV_ATTR_GW_BANDWIDTH_DOWN: defines the download bandwidth which
0404      *  is propagated by this node if %BATADV_ATTR_GW_BANDWIDTH_MODE was set
0405      *  to 'server'.
0406      */
0407     BATADV_ATTR_GW_BANDWIDTH_DOWN,
0408 
0409     /**
0410      * @BATADV_ATTR_GW_BANDWIDTH_UP: defines the upload bandwidth which
0411      *  is propagated by this node if %BATADV_ATTR_GW_BANDWIDTH_MODE was set
0412      *  to 'server'.
0413      */
0414     BATADV_ATTR_GW_BANDWIDTH_UP,
0415 
0416     /**
0417      * @BATADV_ATTR_GW_MODE: defines the state of the gateway features.
0418      * Possible values are specified in enum batadv_gw_modes
0419      */
0420     BATADV_ATTR_GW_MODE,
0421 
0422     /**
0423      * @BATADV_ATTR_GW_SEL_CLASS: defines the selection criteria this node
0424      *  will use to choose a gateway if gw_mode was set to 'client'.
0425      */
0426     BATADV_ATTR_GW_SEL_CLASS,
0427 
0428     /**
0429      * @BATADV_ATTR_HOP_PENALTY: defines the penalty which will be applied
0430      *  to an originator message's tq-field on every hop and/or per
0431      *  hard interface
0432      */
0433     BATADV_ATTR_HOP_PENALTY,
0434 
0435     /**
0436      * @BATADV_ATTR_LOG_LEVEL: bitmask with to define which debug messages
0437      *  should be send to the debug log/trace ring buffer
0438      */
0439     BATADV_ATTR_LOG_LEVEL,
0440 
0441     /**
0442      * @BATADV_ATTR_MULTICAST_FORCEFLOOD_ENABLED: whether multicast
0443      *  optimizations should be replaced by simple broadcast-like flooding
0444      *  of multicast packets. If set to non-zero then all nodes in the mesh
0445      *  are going to use classic flooding for any multicast packet with no
0446      *  optimizations.
0447      */
0448     BATADV_ATTR_MULTICAST_FORCEFLOOD_ENABLED,
0449 
0450     /**
0451      * @BATADV_ATTR_NETWORK_CODING_ENABLED: whether Network Coding (using
0452      *  some magic to send fewer wifi packets but still the same content) is
0453      *  enabled or not.
0454      */
0455     BATADV_ATTR_NETWORK_CODING_ENABLED,
0456 
0457     /**
0458      * @BATADV_ATTR_ORIG_INTERVAL: defines the interval in milliseconds in
0459      *  which batman sends its protocol messages.
0460      */
0461     BATADV_ATTR_ORIG_INTERVAL,
0462 
0463     /**
0464      * @BATADV_ATTR_ELP_INTERVAL: defines the interval in milliseconds in
0465      *  which batman emits probing packets for neighbor sensing (ELP).
0466      */
0467     BATADV_ATTR_ELP_INTERVAL,
0468 
0469     /**
0470      * @BATADV_ATTR_THROUGHPUT_OVERRIDE: defines the throughput value to be
0471      *  used by B.A.T.M.A.N. V when estimating the link throughput using
0472      *  this interface. If the value is set to 0 then batman-adv will try to
0473      *  estimate the throughput by itself.
0474      */
0475     BATADV_ATTR_THROUGHPUT_OVERRIDE,
0476 
0477     /**
0478      * @BATADV_ATTR_MULTICAST_FANOUT: defines the maximum number of packet
0479      * copies that may be generated for a multicast-to-unicast conversion.
0480      * Once this limit is exceeded distribution will fall back to broadcast.
0481      */
0482     BATADV_ATTR_MULTICAST_FANOUT,
0483 
0484     /* add attributes above here, update the policy in netlink.c */
0485 
0486     /**
0487      * @__BATADV_ATTR_AFTER_LAST: internal use
0488      */
0489     __BATADV_ATTR_AFTER_LAST,
0490 
0491     /**
0492      * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available
0493      */
0494     NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST,
0495 
0496     /**
0497      * @BATADV_ATTR_MAX: highest attribute number currently defined
0498      */
0499     BATADV_ATTR_MAX = __BATADV_ATTR_AFTER_LAST - 1
0500 };
0501 
0502 /**
0503  * enum batadv_nl_commands - supported batman-adv netlink commands
0504  */
0505 enum batadv_nl_commands {
0506     /**
0507      * @BATADV_CMD_UNSPEC: unspecified command to catch errors
0508      */
0509     BATADV_CMD_UNSPEC,
0510 
0511     /**
0512      * @BATADV_CMD_GET_MESH: Get attributes from softif/mesh
0513      */
0514     BATADV_CMD_GET_MESH,
0515 
0516     /**
0517      * @BATADV_CMD_GET_MESH_INFO: Alias for @BATADV_CMD_GET_MESH
0518      */
0519     BATADV_CMD_GET_MESH_INFO = BATADV_CMD_GET_MESH,
0520 
0521     /**
0522      * @BATADV_CMD_TP_METER: Start a tp meter session
0523      */
0524     BATADV_CMD_TP_METER,
0525 
0526     /**
0527      * @BATADV_CMD_TP_METER_CANCEL: Cancel a tp meter session
0528      */
0529     BATADV_CMD_TP_METER_CANCEL,
0530 
0531     /**
0532      * @BATADV_CMD_GET_ROUTING_ALGOS: Query the list of routing algorithms.
0533      */
0534     BATADV_CMD_GET_ROUTING_ALGOS,
0535 
0536     /**
0537      * @BATADV_CMD_GET_HARDIF: Get attributes from a hardif of the
0538      *  current softif
0539      */
0540     BATADV_CMD_GET_HARDIF,
0541 
0542     /**
0543      * @BATADV_CMD_GET_HARDIFS: Alias for @BATADV_CMD_GET_HARDIF
0544      */
0545     BATADV_CMD_GET_HARDIFS = BATADV_CMD_GET_HARDIF,
0546 
0547     /**
0548      * @BATADV_CMD_GET_TRANSTABLE_LOCAL: Query list of local translations
0549      */
0550     BATADV_CMD_GET_TRANSTABLE_LOCAL,
0551 
0552     /**
0553      * @BATADV_CMD_GET_TRANSTABLE_GLOBAL: Query list of global translations
0554      */
0555     BATADV_CMD_GET_TRANSTABLE_GLOBAL,
0556 
0557     /**
0558      * @BATADV_CMD_GET_ORIGINATORS: Query list of originators
0559      */
0560     BATADV_CMD_GET_ORIGINATORS,
0561 
0562     /**
0563      * @BATADV_CMD_GET_NEIGHBORS: Query list of neighbours
0564      */
0565     BATADV_CMD_GET_NEIGHBORS,
0566 
0567     /**
0568      * @BATADV_CMD_GET_GATEWAYS: Query list of gateways
0569      */
0570     BATADV_CMD_GET_GATEWAYS,
0571 
0572     /**
0573      * @BATADV_CMD_GET_BLA_CLAIM: Query list of bridge loop avoidance claims
0574      */
0575     BATADV_CMD_GET_BLA_CLAIM,
0576 
0577     /**
0578      * @BATADV_CMD_GET_BLA_BACKBONE: Query list of bridge loop avoidance
0579      * backbones
0580      */
0581     BATADV_CMD_GET_BLA_BACKBONE,
0582 
0583     /**
0584      * @BATADV_CMD_GET_DAT_CACHE: Query list of DAT cache entries
0585      */
0586     BATADV_CMD_GET_DAT_CACHE,
0587 
0588     /**
0589      * @BATADV_CMD_GET_MCAST_FLAGS: Query list of multicast flags
0590      */
0591     BATADV_CMD_GET_MCAST_FLAGS,
0592 
0593     /**
0594      * @BATADV_CMD_SET_MESH: Set attributes for softif/mesh
0595      */
0596     BATADV_CMD_SET_MESH,
0597 
0598     /**
0599      * @BATADV_CMD_SET_HARDIF: Set attributes for hardif of the
0600      *  current softif
0601      */
0602     BATADV_CMD_SET_HARDIF,
0603 
0604     /**
0605      * @BATADV_CMD_GET_VLAN: Get attributes from a VLAN of the
0606      *  current softif
0607      */
0608     BATADV_CMD_GET_VLAN,
0609 
0610     /**
0611      * @BATADV_CMD_SET_VLAN: Set attributes for VLAN of the
0612      *  current softif
0613      */
0614     BATADV_CMD_SET_VLAN,
0615 
0616     /* add new commands above here */
0617 
0618     /**
0619      * @__BATADV_CMD_AFTER_LAST: internal use
0620      */
0621     __BATADV_CMD_AFTER_LAST,
0622 
0623     /**
0624      * @BATADV_CMD_MAX: highest used command number
0625      */
0626     BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1
0627 };
0628 
0629 /**
0630  * enum batadv_tp_meter_reason - reason of a tp meter test run stop
0631  */
0632 enum batadv_tp_meter_reason {
0633     /**
0634      * @BATADV_TP_REASON_COMPLETE: sender finished tp run
0635      */
0636     BATADV_TP_REASON_COMPLETE       = 3,
0637 
0638     /**
0639      * @BATADV_TP_REASON_CANCEL: sender was stopped during run
0640      */
0641     BATADV_TP_REASON_CANCEL         = 4,
0642 
0643     /* error status >= 128 */
0644 
0645     /**
0646      * @BATADV_TP_REASON_DST_UNREACHABLE: receiver could not be reached or
0647      * didn't answer
0648      */
0649     BATADV_TP_REASON_DST_UNREACHABLE    = 128,
0650 
0651     /**
0652      * @BATADV_TP_REASON_RESEND_LIMIT: (unused) sender retry reached limit
0653      */
0654     BATADV_TP_REASON_RESEND_LIMIT       = 129,
0655 
0656     /**
0657      * @BATADV_TP_REASON_ALREADY_ONGOING: test to or from the same node
0658      * already ongoing
0659      */
0660     BATADV_TP_REASON_ALREADY_ONGOING    = 130,
0661 
0662     /**
0663      * @BATADV_TP_REASON_MEMORY_ERROR: test was stopped due to low memory
0664      */
0665     BATADV_TP_REASON_MEMORY_ERROR       = 131,
0666 
0667     /**
0668      * @BATADV_TP_REASON_CANT_SEND: failed to send via outgoing interface
0669      */
0670     BATADV_TP_REASON_CANT_SEND      = 132,
0671 
0672     /**
0673      * @BATADV_TP_REASON_TOO_MANY: too many ongoing sessions
0674      */
0675     BATADV_TP_REASON_TOO_MANY       = 133,
0676 };
0677 
0678 /**
0679  * enum batadv_ifla_attrs - batman-adv ifla nested attributes
0680  */
0681 enum batadv_ifla_attrs {
0682     /**
0683      * @IFLA_BATADV_UNSPEC: unspecified attribute which is not parsed by
0684      *  rtnetlink
0685      */
0686     IFLA_BATADV_UNSPEC,
0687 
0688     /**
0689      * @IFLA_BATADV_ALGO_NAME: routing algorithm (name) which should be
0690      *  used by the newly registered batadv net_device.
0691      */
0692     IFLA_BATADV_ALGO_NAME,
0693 
0694     /* add attributes above here, update the policy in soft-interface.c */
0695 
0696     /**
0697      * @__IFLA_BATADV_MAX: internal use
0698      */
0699     __IFLA_BATADV_MAX,
0700 };
0701 
0702 #define IFLA_BATADV_MAX (__IFLA_BATADV_MAX - 1)
0703 
0704 #endif /* _UAPI_LINUX_BATMAN_ADV_H_ */