src/servers/inet/generic/tcp_int.h File Reference

Go to the source code of this file.

Classes

struct  tcp_port
struct  tcp_fd
struct  tcp_conn

Defines

#define IP_TCP_MIN_HDR_SIZE   (IP_MIN_HDR_SIZE+TCP_MIN_HDR_SIZE)
#define TCP_CONN_HASH_SHIFT   4
#define TCP_CONN_HASH_NR   (1 << TCP_CONN_HASH_SHIFT)
#define TPF_EMPTY   0x0
#define TPF_SUSPEND   0x1
#define TPF_READ_IP   0x2
#define TPF_READ_SP   0x4
#define TPF_WRITE_IP   0x8
#define TPF_WRITE_SP   0x10
#define TPF_DELAY_TCP   0x40
#define TPS_EMPTY   0
#define TPS_SETPROTO   1
#define TPS_GETCONF   2
#define TPS_MAIN   3
#define TPS_ERROR   4
#define TFL_LISTEN_MAX   5
#define TFF_EMPTY   0x0
#define TFF_INUSE   0x1
#define TFF_READ_IP   0x2
#define TFF_WRITE_IP   0x4
#define TFF_IOCTL_IP   0x8
#define TFF_CONF_SET   0x10
#define TFF_IOC_INIT_SP   0x20
#define TFF_LISTENQ   0x40
#define TFF_CONNECTING   0x80
#define TFF_CONNECTED   0x100
#define TFF_WR_URG   0x200
#define TFF_PUSH_DATA   0x400
#define TFF_RECV_URG   0x800
#define TFF_SEL_READ   0x1000
#define TFF_SEL_WRITE   0x2000
#define TFF_SEL_EXCEPT   0x4000
#define TFF_DEL_RST   0x8000
#define TFF_COOKIE   0x10000
#define TCF_EMPTY   0x0
#define TCF_INUSE   0x1
#define TCF_FIN_RECV   0x2
#define TCF_RCV_PUSH   0x4
#define TCF_MORE2WRITE   0x8
#define TCF_SEND_ACK   0x10
#define TCF_FIN_SENT   0x20
#define TCF_BSD_URG   0x40
#define TCF_NO_PUSH   0x80
#define TCF_PUSH_NOW   0x100
#define TCF_PMTU   0x200
#define TCS_CLOSED   0
#define TCS_LISTEN   1
#define TCS_SYN_RECEIVED   2
#define TCS_SYN_SENT   3
#define TCS_ESTABLISHED   4
#define TCS_CLOSING   5
#define TCP_FD_NR   (10*IP_PORT_MAX)
#define TCP_CONN_NR   (2*TCP_FD_NR)
#define tcp_Lmod4G(n1, n2)   (!!(((n1)-(n2)) & 0x80000000L))
#define tcp_GEmod4G(n1, n2)   (!(((n1)-(n2)) & 0x80000000L))
#define tcp_Gmod4G(n1, n2)   (!!(((n2)-(n1)) & 0x80000000L))
#define tcp_LEmod4G(n1, n2)   (!(((n2)-(n1)) & 0x80000000L))

Typedefs

typedef struct tcp_port tcp_port_t
typedef struct tcp_fd tcp_fd_t
typedef struct tcp_conn tcp_conn_t

Functions

void tcp_frag2conn ARGS ((tcp_conn_t *tcp_conn, ip_hdr_t *ip_hdr, tcp_hdr_t *tcp_hdr, acc_t *tcp_data, size_t data_len))
void tcp_fd_read ARGS ((tcp_conn_t *tcp_conn, int enq))
unsigned tcp_sel_read ARGS ((tcp_conn_t *tcp_conn))
void tcp_bytesavailable ARGS ((tcp_fd_t *tcp_fd, int *bytesp))
void tcp_release_retrans ARGS ((tcp_conn_t *tcp_conn, u32_t seg_ack, U16_t new_win))
void tcp_close_connection ARGS ((tcp_conn_t *tcp_conn, int error))
void tcp_port_write ARGS ((tcp_port_t *tcp_port))
void tcp_extract_ipopt ARGS ((tcp_conn_t *tcp_conn, ip_hdr_t *ip_hdr))
void tcp_extract_tcpopt ARGS ((tcp_conn_t *tcp_conn, tcp_hdr_t *tcp_hdr, size_t *mssp))
void tcp_get_ipopt ARGS ((tcp_conn_t *tcp_conn, ip_hdropt_t *ip_hdropt))
void tcp_get_tcpopt ARGS ((tcp_conn_t *tcp_conn, tcp_hdropt_t *tcp_hdropt))
acc_t *tcp_make_header ARGS ((tcp_conn_t *tcp_conn, ip_hdr_t **ref_ip_hdr, tcp_hdr_t **ref_tcp_hdr, acc_t *data))
u16_t tcp_pack_oneCsum ARGS ((ip_hdr_t *ip_hdr, acc_t *tcp_pack))
void tcp_print_pack ARGS ((ip_hdr_t *ip_hdr, tcp_hdr_t *tcp_hdr))
int tcp_LEmod4G ARGS ((u32_t n1, u32_t n2))
int tcp_su4listen ARGS ((tcp_fd_t *tcp_fd, tcp_conn_t *tcp_conn, int do_listenq))
void tcp_reply_ioctl ARGS ((tcp_fd_t *tcp_fd, int reply))
void tcp_reply_write ARGS ((tcp_fd_t *tcp_fd, size_t reply))
void tcp_notreach ARGS ((tcp_conn_t *tcp_conn, int error))

Variables

EXTERN tcp_port_ttcp_port_table
EXTERN tcp_conn_t tcp_conn_table [TCP_CONN_NR]
EXTERN tcp_fd_t tcp_fd_table [TCP_FD_NR]


Define Documentation

#define IP_TCP_MIN_HDR_SIZE   (IP_MIN_HDR_SIZE+TCP_MIN_HDR_SIZE)

Definition at line 10 of file tcp_int.h.

#define TCF_BSD_URG   0x40

Definition at line 180 of file tcp_int.h.

#define TCF_EMPTY   0x0

Definition at line 173 of file tcp_int.h.

#define TCF_FIN_RECV   0x2

Definition at line 175 of file tcp_int.h.

#define TCF_FIN_SENT   0x20

Definition at line 179 of file tcp_int.h.

#define TCF_INUSE   0x1

Definition at line 174 of file tcp_int.h.

#define TCF_MORE2WRITE   0x8

Definition at line 177 of file tcp_int.h.

#define TCF_NO_PUSH   0x80

Definition at line 181 of file tcp_int.h.

#define TCF_PMTU   0x200

Definition at line 183 of file tcp_int.h.

#define TCF_PUSH_NOW   0x100

Definition at line 182 of file tcp_int.h.

#define TCF_RCV_PUSH   0x4

Definition at line 176 of file tcp_int.h.

#define TCF_SEND_ACK   0x10

Definition at line 178 of file tcp_int.h.

#define TCP_CONN_HASH_NR   (1 << TCP_CONN_HASH_SHIFT)

Definition at line 13 of file tcp_int.h.

#define TCP_CONN_HASH_SHIFT   4

Definition at line 12 of file tcp_int.h.

#define TCP_CONN_NR   (2*TCP_FD_NR)

Definition at line 251 of file tcp_int.h.

#define TCP_FD_NR   (10*IP_PORT_MAX)

Definition at line 250 of file tcp_int.h.

#define tcp_GEmod4G ( n1,
n2   )     (!(((n1)-(n2)) & 0x80000000L))

Definition at line 258 of file tcp_int.h.

#define tcp_Gmod4G ( n1,
n2   )     (!!(((n2)-(n1)) & 0x80000000L))

Definition at line 259 of file tcp_int.h.

#define tcp_LEmod4G ( n1,
n2   )     (!(((n2)-(n1)) & 0x80000000L))

Definition at line 260 of file tcp_int.h.

#define tcp_Lmod4G ( n1,
n2   )     (!!(((n1)-(n2)) & 0x80000000L))

Definition at line 257 of file tcp_int.h.

#define TCS_CLOSED   0

Definition at line 189 of file tcp_int.h.

#define TCS_CLOSING   5

Definition at line 194 of file tcp_int.h.

#define TCS_ESTABLISHED   4

Definition at line 193 of file tcp_int.h.

#define TCS_LISTEN   1

Definition at line 190 of file tcp_int.h.

#define TCS_SYN_RECEIVED   2

Definition at line 191 of file tcp_int.h.

#define TCS_SYN_SENT   3

Definition at line 192 of file tcp_int.h.

#define TFF_CONF_SET   0x10

Definition at line 73 of file tcp_int.h.

#define TFF_CONNECTED   0x100

Definition at line 77 of file tcp_int.h.

#define TFF_CONNECTING   0x80

Definition at line 76 of file tcp_int.h.

#define TFF_COOKIE   0x10000

Definition at line 85 of file tcp_int.h.

#define TFF_DEL_RST   0x8000

Definition at line 84 of file tcp_int.h.

#define TFF_EMPTY   0x0

Definition at line 68 of file tcp_int.h.

#define TFF_INUSE   0x1

Definition at line 69 of file tcp_int.h.

#define TFF_IOC_INIT_SP   0x20

Definition at line 74 of file tcp_int.h.

#define TFF_IOCTL_IP   0x8

Definition at line 72 of file tcp_int.h.

#define TFF_LISTENQ   0x40

Definition at line 75 of file tcp_int.h.

#define TFF_PUSH_DATA   0x400

Definition at line 79 of file tcp_int.h.

#define TFF_READ_IP   0x2

Definition at line 70 of file tcp_int.h.

#define TFF_RECV_URG   0x800

Definition at line 80 of file tcp_int.h.

#define TFF_SEL_EXCEPT   0x4000

Definition at line 83 of file tcp_int.h.

#define TFF_SEL_READ   0x1000

Definition at line 81 of file tcp_int.h.

#define TFF_SEL_WRITE   0x2000

Definition at line 82 of file tcp_int.h.

#define TFF_WR_URG   0x200

Definition at line 78 of file tcp_int.h.

#define TFF_WRITE_IP   0x4

Definition at line 71 of file tcp_int.h.

#define TFL_LISTEN_MAX   5

Definition at line 45 of file tcp_int.h.

#define TPF_DELAY_TCP   0x40

Definition at line 37 of file tcp_int.h.

#define TPF_EMPTY   0x0

Definition at line 31 of file tcp_int.h.

#define TPF_READ_IP   0x2

Definition at line 33 of file tcp_int.h.

#define TPF_READ_SP   0x4

Definition at line 34 of file tcp_int.h.

#define TPF_SUSPEND   0x1

Definition at line 32 of file tcp_int.h.

#define TPF_WRITE_IP   0x8

Definition at line 35 of file tcp_int.h.

#define TPF_WRITE_SP   0x10

Definition at line 36 of file tcp_int.h.

#define TPS_EMPTY   0

Definition at line 39 of file tcp_int.h.

#define TPS_ERROR   4

Definition at line 43 of file tcp_int.h.

#define TPS_GETCONF   2

Definition at line 41 of file tcp_int.h.

#define TPS_MAIN   3

Definition at line 42 of file tcp_int.h.

#define TPS_SETPROTO   1

Definition at line 40 of file tcp_int.h.


Typedef Documentation

typedef struct tcp_conn tcp_conn_t

typedef struct tcp_fd tcp_fd_t

typedef struct tcp_port tcp_port_t


Function Documentation

void tcp_notreach ARGS ( (tcp_conn_t *tcp_conn, int error)   ) 

void tcp_reply_write ARGS ( (tcp_fd_t *tcp_fd, size_t reply)   ) 

void tcp_reply_ioctl ARGS ( (tcp_fd_t *tcp_fd, int reply)   ) 

int tcp_su4listen ARGS ( (tcp_fd_t *tcp_fd, tcp_conn_t *tcp_conn, int do_listenq)   ) 

int tcp_LEmod4G ARGS ( (u32_t n1, u32_t n2)   ) 

void tcp_print_pack ARGS ( (ip_hdr_t *ip_hdr, tcp_hdr_t *tcp_hdr  ) 

u16_t tcp_pack_oneCsum ARGS ( (ip_hdr_t *ip_hdr, acc_t *tcp_pack)   ) 

acc_t* tcp_make_header ARGS ( (tcp_conn_t *tcp_conn, ip_hdr_t **ref_ip_hdr, tcp_hdr_t **ref_tcp_hdr, acc_t *data  ) 

void tcp_get_tcpopt ARGS ( (tcp_conn_t *tcp_conn, tcp_hdropt_t *tcp_hdropt  ) 

void tcp_get_ipopt ARGS ( (tcp_conn_t *tcp_conn, ip_hdropt_t *ip_hdropt  ) 

void tcp_extract_tcpopt ARGS ( (tcp_conn_t *tcp_conn, tcp_hdr_t *tcp_hdr, size_t *mssp)   ) 

void tcp_extract_ipopt ARGS ( (tcp_conn_t *tcp_conn, ip_hdr_t *ip_hdr  ) 

void tcp_port_write ARGS ( (tcp_port_t *tcp_port  ) 

void tcp_close_connection ARGS ( (tcp_conn_t *tcp_conn, int error)   ) 

void tcp_release_retrans ARGS ( (tcp_conn_t *tcp_conn, u32_t seg_ack, U16_t new_win)   ) 

void tcp_bytesavailable ARGS ( (tcp_fd_t *tcp_fd, int *bytesp)   ) 

unsigned tcp_sel_read ARGS ( (tcp_conn_t *tcp_conn  ) 

void tcp_fd_read ARGS ( (tcp_conn_t *tcp_conn, int enq)   ) 

void tcp_frag2conn ARGS ( (tcp_conn_t *tcp_conn, ip_hdr_t *ip_hdr, tcp_hdr_t *tcp_hdr, acc_t *tcp_data, size_t data_len  ) 


Variable Documentation

EXTERN tcp_conn_t tcp_conn_table[TCP_CONN_NR]

Definition at line 254 of file tcp_int.h.

EXTERN tcp_fd_t tcp_fd_table[TCP_FD_NR]

Definition at line 255 of file tcp_int.h.

Definition at line 253 of file tcp_int.h.


Generated on Tue Mar 9 04:37:01 2010 for Minix by  doxygen 1.5.8