sunplace
驱动牛犊
驱动牛犊
  • 注册日期2004-10-09
  • 最后登录2006-04-26
  • 粉丝0
  • 关注0
  • 积分47分
  • 威望8点
  • 贡献值0点
  • 好评度1点
  • 原创分0分
  • 专家分0分
阅读:1183回复:0

inpcb结构

楼主#
更多 发布于:2004-12-17 19:45
有两种类型的inpcb结果,其中一是linux下的,如下,但是如果我要移植修改的话,他们之间如何修改,请大家给点意见。
struct inpcb {
struct inpcb *inp_next, *inp_prev; /* pointers to other pcb's */
struct inpcb *inp_head; /* pointer back to chain of inpcb's */ /* for this protocol */

struct in_addr inp_faddr; /* foreign host table entry */
ushort_t inp_fport; /* foreign port */
struct in_addr inp_laddr; /* local host table entry */
ushort_t inp_lport; /* local port */
struct socket *inp_socket; /* back pointer to socket */
caddr_t inp_ppcb; /* pointer to per-protocol pcb */
struct route inp_route; /* placeholder for routing entry */
struct mbuf *inp_options; /* IP options */
};


struct inpcb {
LIST_ENTRY(inpcb) inp_list; /* list for all PCBs of this proto */
LIST_ENTRY(inpcb) inp_hash; /* hash list */
struct inpcbinfo *inp_pcbinfo;
struct in_addr inp_faddr; /* foreign host table entry */
u_short inp_fport; /* foreign port */
struct in_addr inp_laddr; /* local host table entry */
u_short inp_lport; /* local port */
struct socket *inp_socket; /* back pointer to socket */
caddr_t inp_ppcb; /* pointer to per-protocol pcb */
struct route inp_route; /* placeholder for routing entry */
int inp_flags; /* generic IP/datagram flags */
struct ip inp_ip; /* header prototype; should have more */
struct mbuf *inp_options; /* IP options */
struct ip_moptions *inp_moptions; /* IP multicast options */
};
游客

返回顶部