很好的TCP_IP协议源代码分析,很适用很好

源代码在线查看: sockaddr.h

软件大小: 635 K
上传用户: yubo0808140725
关键词: TCP_IP 协议 源代码分析
下载地址: 免注册下载 普通下载 VIP

相关代码

				#ifndef _SOCKADDR_H
				#define _SOCKADDR_H
				
				/* Generic socket address structure */
				struct sockaddr {
					short sa_family;
					char sa_data[14];
				};
				
				/* This is a structure for "historical" reasons (whatever they are) */
				struct in_addr {
					unsigned long s_addr;
				};
				
				/* Socket address, DARPA Internet style */
				struct sockaddr_in {
					short sin_family;
					unsigned short sin_port;
					struct in_addr sin_addr;
					char sin_zero[8];
				};
				
				#define	SOCKSIZE	(sizeof(struct sockaddr))
				#define MAXSOCKSIZE	SOCKSIZE /* All sockets are of the same size for now */
				
				#endif /* _SOCKADDR_H */
							

相关资源