net/batman-adv/types.h

Source file repositories/reference/linux-study-clean/net/batman-adv/types.h

File Facts

System
Linux kernel
Corpus path
net/batman-adv/types.h
Extension
.h
Size
59771 bytes
Lines
2295
Domain
Networking Core
Bucket
Sockets, Protocols, Packet Path, And Network Policy
Inferred role
Networking Core: implementation source
Status
source implementation candidate

Why This File Exists

Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.

Dependency Surface

Detected Declarations

Annotated Snippet

struct batadv_ogm_buf {
	/** @buf: buffer holding the OGM packet */
	void *buf;

	/** @len: length of the OGM packet buffer data */
	size_t len;

	/** @capacity: size of allocated buf */
	size_t capacity;

	/** @header_length: fixed size header length (must be <= len) */
	size_t header_length;
};

/**
 * struct batadv_hard_iface_bat_iv - per hard-interface B.A.T.M.A.N. IV data
 */
struct batadv_hard_iface_bat_iv {
	/** @ogm_buff: buffer holding the OGM packet */
	struct batadv_ogm_buf ogm_buff;

	/** @ogm_seqno: OGM sequence number - used to identify each OGM */
	atomic_t ogm_seqno;

	/** @reschedule_work: recover OGM schedule after schedule error */
	struct delayed_work reschedule_work;

	/** @ogm_buff_mutex: lock protecting ogm_buff */
	struct mutex ogm_buff_mutex;
};

/**
 * enum batadv_v_hard_iface_flags - interface flags useful to B.A.T.M.A.N. V
 */
enum batadv_v_hard_iface_flags {
	/**
	 * @BATADV_FULL_DUPLEX: tells if the connection over this link is
	 *  full-duplex
	 */
	BATADV_FULL_DUPLEX	= BIT(0),

	/**
	 * @BATADV_WARNING_DEFAULT: tells whether we have warned the user that
	 *  no throughput data is available for this interface and that default
	 *  values are assumed.
	 */
	BATADV_WARNING_DEFAULT	= BIT(1),
};

/**
 * struct batadv_hard_iface_bat_v - per hard-interface B.A.T.M.A.N. V data
 */
struct batadv_hard_iface_bat_v {
	/** @elp_interval: time interval between two ELP transmissions */
	u32 elp_interval;

	/** @elp_seqno: current ELP sequence number */
	atomic_t elp_seqno;

	/** @elp_skb: base skb containing the ELP message to send */
	struct sk_buff *elp_skb;

	/** @elp_wq: workqueue used to schedule ELP transmissions */
	struct delayed_work elp_wq;

	/** @aggr_wq: workqueue used to transmit queued OGM packets */
	struct delayed_work aggr_wq;

	/** @aggr_list: queue for to be aggregated OGM packets */
	struct sk_buff_head aggr_list;

	/** @aggr_len: size of the OGM aggregate (excluding ethernet header) */
	unsigned int aggr_len;

	/**
	 * @throughput_override: throughput override to disable link
	 *  auto-detection
	 */
	u32 throughput_override;

	/** @flags: interface specific flags */
	u8 flags;
};

/**
 * enum batadv_hard_iface_wifi_flags - Flags describing the wifi configuration
 *  of a batadv_hard_iface
 */
enum batadv_hard_iface_wifi_flags {
	/** @BATADV_HARDIF_WIFI_WEXT_DIRECT: it is a wext wifi device */

Annotation

Implementation Notes