in_pcb.h

Go to the documentation of this file.
00001 /*
00002 ** in_pcb.h for  in /home/anoman/work/lse/atomix/lseos-net/inet/include
00003 ** 
00004 ** Copyright (c)2004 Arthur Kopatsy
00005 ** Login   <kopats_a@epita.fr>
00006 ** 
00007 ** Started on  Sun Oct  3 16:59:35 2004 Arthur Kopatsy
00008 ** Last update Mon Nov 29 10:45:16 2004 Arthur Kopatsy
00009 */
00010 
00011 #ifndef IN_PCB_H_
00012 #define IN_PCB_H_
00013 
00014 struct s_in_pcb
00015 {
00016   LIST_ENTRY(s_in_pcb)                  inp_next;
00017   struct sockaddr_in                    inp_laddr;              /* Describe local addr and port */
00018   struct sockaddr_in                    inp_raddr;              /* Describe remote addr and port */
00019   
00020   int                                   inp_flags;
00021 };
00022 
00023 /* 
00024 ** In_pcb Flags
00025 */
00026 
00027 #define INP_BOUND       (1<<0)
00028 #define INP_CONNECTED   (1<<1)
00029 #define INP_ANONPORT    (1<<2)
00030 
00031 LIST_HEAD(s_in_pcb_list, s_in_pcb);
00032 
00033 /* PROTO in_pcb.c */
00034 #ifdef __INET__
00035 /* in_pcb.c */
00036 void in_pcb_free(struct s_in_pcb_list *in_pcb_list, struct s_in_pcb *in_pcb);
00037 struct s_in_pcb *in_pcb_alloc(void);
00038 int in_pcb_bind(struct s_in_pcb_list *in_pcb_list, struct s_in_pcb *in_pcb, struct sockaddr_in *sin);
00039 int in_pcb_connect(struct s_in_pcb_list *in_pcb_list, struct s_in_pcb *in_pcb, struct sockaddr_in *sin);
00040 int in_pcb_match(struct s_in_pcb *in_pcb, struct sockaddr_in *laddr, struct sockaddr_in *raddr);
00041 struct s_in_pcb *in_pcb_lookup_port(struct s_in_pcb_list *in_pcb_list, struct in_addr in_addr, u_int16_t in_port);
00042 int in_pcb_getsockname(struct s_in_pcb *in_pcb, struct sockaddr_in *sin);
00043 int in_pcb_getpeername(struct s_in_pcb *in_pcb, struct sockaddr_in *sin);
00044 #endif /* __INET__ */
00045 #endif

Generated on Wed May 24 23:05:52 2006 for LSE/OS by  doxygen 1.4.6