pr.h
来自「用于嵌入式系统的TCP/IP协议栈及若干服务」· C头文件 代码 · 共 90 行
H
90 行
/** Copyright (c) 1998-2001 by NETsilicon Inc.** This software is copyrighted by and is the sole property of* NETsilicon. All rights, title, ownership, or other interests* in the software remain the property of NETsilicon. This* software may only be used in accordance with the corresponding* license agreement. Any unauthorized use, duplication, transmission,* distribution, or disclosure of this software is expressly forbidden.** This Copyright notice may not be removed or modified without prior* written consent of NETsilicon.** NETsilicon, reserves the right to modify this software* without notice.** NETsilicon* 411 Waverley Oaks Road USA 781.647.1234* Suite 227 http://www.netsilicon.com* Waltham, MA 02452 AmericaSales@netsilicon.com*************************************************************************** $Name: Fusion 6.52 Fusion 6.51 $* $Date: 2002/01/03 17:41:10 $* $Source: M:/psisrc/stack/incl/rcs/pr.h $* $Revision: 1.9 $*************************************************************************** File Description: Definitions and macros for dealing with* the `pr_t' structure**************************************************************************/#ifndef _PR_#define _PR_#include "config.h"#include "ccdep.h"#include "std.h"#include "socket.h"#include "q.h"#include "timer.h"#include "dsu.h"#include "psu.h"#include "so.h"/* protocol switch */typedef struct pr_t { u16 pr_af; /* address format */ u16 pr_protocol; u16 pr_type; u16 pr_flags; int (*pr_init)(struct pr_t * prp); int (*pr_accept)(struct so_t * sop, int *nfdp, int flags, saddr *addrname, int *addrlenp); int (*pr_attach)(struct so_t * sop); int (*pr_bind)(struct so_t * sop, saddr * to, int to_len); int (*pr_connect)(struct so_t * sop, saddr * to, int to_len); int (*pr_ioctl)(struct so_t * sop, int cmnd, u32 * addr, int len); int (*pr_getopt)(struct so_t * sop, int level, int optname, char * optval, int * optlen); int (*pr_listen)(struct so_t * sop, int backlog); int (*pr_inaddr)(saddr * to, int to_len, so_addr * dest); int (*pr_outaddr)(struct so_t * sop, saddr * name, int * namelen, int type); int (*pr_pair)(struct so_t *, struct so_t *); int (*pr_recv)(struct so_t * sop, char * buf, int * blenp, int flags); int (*pr_send)(struct so_t * sop, char * buf, int * blenp, int flags); int (*pr_setopt)(struct so_t * sop, int level, int optname, u8 * optval, int optlen); int (*pr_shutdown)(struct so_t * sop, int direction); st (*pr_up)(struct m *); int (* pr_close)(struct so_t * sop); st (*pr_err)(struct m *); int (*pr_dink)(struct m *); int (*pr_reject)(struct so_t *, boolean); int (*pr_cabort)(struct so_t *);#ifdef IP_RFC_1191 int (*pr_pmtu_change_notif)(u32 host,u16 new_pmtu);#endif /* IP_RFC_1191 */ char * pr_name; /* protocol's name */} pr_t;/* flags for pr_t.pr_flags */#define F_PR_NEEDS_CONNECT 0x0001#ifdef TCP_TRANSACTION_TCP/* The following flag means that the protocol can take a MSG_EOF flag on the "send" or "sendto" call, and that the protocol can take a "sendto" specifiying a destination address without there having been a previous "connect" call. The "sendto" will do an implied open.*/#define F_PR_IMPLOPCL 0x0002#endif /* TCP_TRANSACTION_TCP */#endif /*_PR_*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?