📄 psu.h
字号:
/** 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: 2001/09/20 10:19:23 $* $Source: M:/psisrc/stack/incl/rcs/psu.h $* $Revision: 1.8 $*************************************************************************** File Description: PSU (Protocol Specific Union)***************************************************************************/#ifndef _PSU_#define _PSU_#include "config.h"#include "ccdep.h"#include "q.h"#include "std.h"#include "timer.h"#include "socket.h"#include "dsu.h"/* Protocol specific structures and their union *//* Transmission Control Protocol Specific Union */typedef struct { struct tcpsv_t * tsv_s; /* pointer to the TCP state vector */ u32 tsv_seqno; u16 tsv_src_port; /* added 4 Windows NT connect problem RS 3/98 */} tcppsu_t;/* handle to the state vector from a socket */#define so_svp so_psu.dpu_state.dpsu_u.dpsu_utcp.tsv_s/* handle to the connecting peer's tcp seqno from a socket */#define so_seqno so_psu.dpu_state.dpsu_u.dpsu_utcp.tsv_seqno#define so_src_port so_psu.dpu_state.dpsu_u.dpsu_utcp.tsv_src_port /* RS 3/98 *//* IP security compartment */#define IPS_SEC 0 /* security, 2 bytes */#define IPS_CMP IPS_SEC+2 /* compartments, 2 bytes */#define IPS_HR IPS_CMP+2 /* handling restrictions, 2 bytes */#define IPS_TCC IPS_HR+2 /* transmission control code (24 bits) 4 bytes*/#define SIZEOF_IPS_T (IPS_TCC+4)typedef struct { u8 array[SIZEOF_IPS_T];} ips_t;/* IP routing structure */typedef struct { u16 ipr_size; /* # of route slots to be allocated */ u32 ipr_addr[9]; /* max # of routes */} ipsr_t;/* IP timestamp structure */typedef struct { u16 ipt_size; /* # of slots allocated */ u16 ipt_type; /* overflow/type field */ u32 ipt_addr[9]; /* max # of datems */} ipst_t;/* Internet Protocol Specific Union */typedef struct { u16 ipsu_flags; /* IP control flags */ u16 ipsu_size; /* Total # of bytes in option field */ u8 ipsu_tos; /* type of service for outgoing packets */ u8 ipsu_ttl; /* time-to-live for outgoing packets */ u8 ipsu_mnttl; /* min time-to-live */ u8 ipsu_mxttl; /* max time-to-live */ u16 ipsu_sid; /* stream id */ u16 ipsu_rsid; /* recorded stream id */ ips_t ipsu_sec; /* security:compartment:handling:tcc */ ipsr_t ipsu_route; /* current route */ ipsr_t ipsu_rroute; /* recorded route */ ipst_t ipsu_time; /* timestamp info */ ipst_t ipsu_rtime; /* recored timestamp info */} ipsu_t;/* Definitions of IP option control flags *//* Flags set by 'setsopt' */#define IP_P_DF 0x0001 /* Don't Fragment */#define IP_P_SID 0x0002 /* Insert Stream ID */#define IP_P_NR 0x0000 /* No route option in effect */#define IP_P_LS 0x0004 /* Loose route option in effect */#define IP_P_SS 0x0008 /* Strict route option in effect */#define IP_P_RR 0x000C /* Record route option in effect */#define IP_P_ROUTE 0x000C /* Route type Mask */#define IP_P_SECURE 0x0010 /* Insert Security option */#define IP_P_TIME 0x0020 /* Insert Timestamp option *//* Flags referenced by 'getsopt' (set by incoming packets) */#define IP_P_RSID 0x0040 /* Stream ID received and recorded */#define IP_P_RNR 0x0000 /* received no route */#define IP_P_RLS 0x0080 /* received loose route */#define IP_P_RSS 0x0100 /* received strict route */#define IP_P_RRR 0x0180 /* received recorded route */#define IP_P_RROUTE 0x0180 /* route received and recorded mask */#define IP_P_RTS 0x0200 /* received time stamp *//* Darpa Protocols Specific Union */typedef struct { ipsu_t dpsu_ip; /* IP */ union { /* union of darpa protocols */ tcppsu_t dpsu_utcp; /* TCP */ } dpsu_u;} dpsu_t;/* Intra machine protocol */typedef struct iasu { u32 ia_flags; u32 ia_id; st (*ia_rfn)(struct m * mp); /* fn to place into receive queue */ char * ia_ppad1;} iasu;typedef union { iasu ia_state; dpsu_t dpu_state;} psu;/* End of packed structures */#endif /*_PSU_*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -