net/can/af_can.h

Source file repositories/reference/linux-study-clean/net/can/af_can.h

File Facts

System
Linux kernel
Corpus path
net/can/af_can.h
Extension
.h
Size
3463 bytes
Lines
104
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 receiver {
	struct hlist_node list;
	canid_t can_id;
	canid_t mask;
	atomic_long_t matches;
	void (*func)(struct sk_buff *skb, void *data);
	void *data;
	char *ident;
	struct sock *sk;
	struct rcu_head rcu;
};

/* statistic structures */

/* can be reset e.g. by can_init_stats() */
struct can_pkg_stats {
	unsigned long jiffies_init;

	atomic_long_t rx_frames;
	atomic_long_t tx_frames;
	atomic_long_t matches;

	unsigned long total_rx_rate;
	unsigned long total_tx_rate;
	unsigned long total_rx_match_ratio;

	unsigned long current_rx_rate;
	unsigned long current_tx_rate;
	unsigned long current_rx_match_ratio;

	unsigned long max_rx_rate;
	unsigned long max_tx_rate;
	unsigned long max_rx_match_ratio;

	atomic_long_t rx_frames_delta;
	atomic_long_t tx_frames_delta;
	atomic_long_t matches_delta;
};

/* persistent statistics */
struct can_rcv_lists_stats {
	unsigned long stats_reset;
	unsigned long user_reset;
	unsigned long rcv_entries;
	unsigned long rcv_entries_max;
};

/* function prototypes for the CAN networklayer procfs (proc.c) */
void can_init_proc(struct net *net);
void can_remove_proc(struct net *net);
void can_stat_update(struct timer_list *t);

#endif /* AF_CAN_H */

Annotation

Implementation Notes