00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00017 #ifndef KRE_NETWORK_H
00018 #define KRE_NETWORK_H
00019
00020
00021 #include <linux/module.h>
00022 #include <linux/net.h>
00023 #include <asm/uaccess.h>
00024 #include <linux/in.h>
00025 #include "kre_debug.h"
00026
00031 extern void kre_net_set_local( struct sockaddr_in *a, int port );
00032
00038 extern void kre_net_set_addr( struct sockaddr_in *a, u8 ip[], int port );
00039
00042 extern void kre_net_sock_release( struct socket **s );
00043
00046 extern int kre_net_sock_create( struct socket **s );
00047
00052 extern int kre_net_sock_setopt_reuse( struct socket *s );
00053
00058 extern int kre_net_sock_bind( struct socket *s, struct sockaddr_in *a );
00059
00063 extern int kre_net_sock_listen( struct socket *s );
00064
00069 extern int kre_net_sock_accept( struct socket *srv, struct socket **cli );
00070
00076 extern int kre_net_connect( struct socket *s, struct sockaddr_in *a );
00077
00084 extern int kre_net_sock_receive(struct socket *s, struct sockaddr_in *a, unsigned char *buf, int len);
00085
00092 extern int kre_net_sock_send(struct socket *s, struct sockaddr_in *a, unsigned char *buf, int len);
00093
00094 #endif