net/tipc/msg.h

Source file repositories/reference/linux-study-clean/net/tipc/msg.h

File Facts

System
Linux kernel
Corpus path
net/tipc/msg.h
Extension
.h
Size
29600 bytes
Lines
1311
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 tipc_skb_cb {
	union {
		struct {
			struct sk_buff *tail;
			unsigned long nxt_retr;
			unsigned long retr_stamp;
			u32 bytes_read;
			u32 orig_member;
			u16 chain_imp;
			u16 ackers;
			u16 retr_cnt;
		} __packed;
#ifdef CONFIG_TIPC_CRYPTO
		struct {
			struct tipc_crypto *rx;
			struct tipc_aead *last;
			u8 recurs;
		} tx_clone_ctx __packed;
#endif
	} __packed;
	union {
		struct {
			u8 validated:1;
#ifdef CONFIG_TIPC_CRYPTO
			u8 encrypted:1;
			u8 decrypted:1;
#define SKB_PROBING	1
#define SKB_GRACING	2
			u8 xmit_type:2;
			u8 tx_clone_deferred:1;
#endif
		};
		u8 flags;
	};
	u8 reserved;
#ifdef CONFIG_TIPC_CRYPTO
	void *crypto_ctx;
#endif
} __packed;

#define TIPC_SKB_CB(__skb) ((struct tipc_skb_cb *)&((__skb)->cb[0]))

struct tipc_msg {
	__be32 hdr[15];
};

/* struct tipc_gap_ack - TIPC Gap ACK block
 * @ack: seqno of the last consecutive packet in link deferdq
 * @gap: number of gap packets since the last ack
 *
 * E.g:
 *       link deferdq: 1 2 3 4      10 11      13 14 15       20
 * --> Gap ACK blocks:      <4, 5>,   <11, 1>,      <15, 4>, <20, 0>
 */
struct tipc_gap_ack {
	__be16 ack;
	__be16 gap;
};

/* struct tipc_gap_ack_blks
 * @len: actual length of the record
 * @ugack_cnt: number of Gap ACK blocks for unicast (following the broadcast
 *             ones)
 * @start_index: starting index for "valid" broadcast Gap ACK blocks
 * @bgack_cnt: number of Gap ACK blocks for broadcast in the record
 * @gacks: array of Gap ACK blocks
 *
 *  31                       16 15                        0
 * +-------------+-------------+-------------+-------------+
 * |  bgack_cnt  |  ugack_cnt  |            len            |
 * +-------------+-------------+-------------+-------------+  -
 * |            gap            |            ack            |   |
 * +-------------+-------------+-------------+-------------+    > bc gacks
 * :                           :                           :   |
 * +-------------+-------------+-------------+-------------+  -
 * |            gap            |            ack            |   |
 * +-------------+-------------+-------------+-------------+    > uc gacks
 * :                           :                           :   |
 * +-------------+-------------+-------------+-------------+  -
 */
struct tipc_gap_ack_blks {
	__be16 len;
	union {
		u8 ugack_cnt;
		u8 start_index;
	};
	u8 bgack_cnt;
	struct tipc_gap_ack gacks[];
};

Annotation

Implementation Notes