ip.h

来自「arm有关bois驱动开发的所有源码以及详细的说明文档」· C头文件 代码 · 共 34 行

H
34
字号
#ifndef __IP_H#define __IP_H
#define UDP  0x11


/*
 *	This structure defines an ip header.
 */

struct iphdr {

	unsigned char	ihl:4,
			version:4;
	unsigned char	tos;
	unsigned short	tot_len;
	unsigned short	id;
	unsigned short	frag_off;
	unsigned char	ttl;
	unsigned char	protocol;
	unsigned short	check;
	unsigned long	saddr;
	unsigned long	daddr;
	/*The options start here. */
}__attribute__ ((packed));
int ip_init(unsigned long ip);
int ip_rcv_packet(struct sk_buff *skb);
int ip_send(struct sk_buff *skb, unsigned long ip, unsigned char proto);
void ip_skb_reserve(struct sk_buff *skb);
unsigned long ip_get_source_ip(struct sk_buff *skb);

#endif /* __IP_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?