code cleanup. renamed exported socket functions as socket_ and removed void *
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1792 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -98,19 +98,6 @@
|
||||
# define get_interfaces core->get_interfaces
|
||||
# define get_primary_addr core->get_primary_addr
|
||||
|
||||
# define initsocket core->initsocket
|
||||
# define socreate core->socreate
|
||||
# define soclose core->soclose
|
||||
|
||||
# define sobind core->sobind
|
||||
# define soconnect core->soconnect
|
||||
# define solisten core->solisten
|
||||
# define soaccept core->soaccept
|
||||
|
||||
# define soo_ioctl core->soo_ioctl
|
||||
# define net_sysctl core->net_sysctl
|
||||
|
||||
# define readit core->readit
|
||||
# define writeit core->writeit
|
||||
|
||||
#endif /* OBOS_CORE_FUNCS_H */
|
||||
|
||||
@@ -129,25 +129,26 @@ struct core_module_info {
|
||||
|
||||
struct in_ifaddr *(*get_primary_addr)(void);
|
||||
|
||||
/* socket functions - used by socket driver */
|
||||
int (*initsocket)(struct socket **);
|
||||
int (*socreate)(int, struct socket *, int, int);
|
||||
int (*soclose)(void *);
|
||||
int (*sobind)(void *, caddr_t, int);
|
||||
int (*solisten)(void *, int);
|
||||
int (*soconnect)(void *, caddr_t, int);
|
||||
int (*recvit)(void *, struct msghdr *, caddr_t, int *);
|
||||
int (*sendit)(void *, struct msghdr *, int, int *);
|
||||
int (*soo_ioctl)(void *, int, caddr_t);
|
||||
int (*net_sysctl)(int *, uint, void *, size_t *, void *, size_t);
|
||||
int (*writeit)(void *, struct iovec *, int);
|
||||
int (*readit)(void*, struct iovec *, int *);
|
||||
int (*sosetopt)(void *, int, int, const void *, size_t);
|
||||
int (*sogetopt)(void *, int, int, void *, size_t *);
|
||||
int (*set_socket_event_callback)(void *, socket_event_callback, void *, int);
|
||||
int (*sogetpeername)(void *, struct sockaddr *, int *);
|
||||
int (*sogetsockname)(void *, struct sockaddr *, int *);
|
||||
int (*soaccept)(struct socket *s, struct socket **news, void *, int *);
|
||||
|
||||
/* socket functions - used by socket driver */
|
||||
int (*socket_init) (struct socket **nso);
|
||||
int (*socket_create) (struct socket *so, int dom, int type, int proto);
|
||||
int (*socket_close) (struct socket *so);
|
||||
int (*socket_bind) (struct socket *so, caddr_t, int);
|
||||
int (*socket_listen) (struct socket *so, int backlog);
|
||||
int (*socket_connect) (struct socket *so, caddr_t, int);
|
||||
int (*socket_accept) (struct socket *so, struct socket **nso, void *, int *);
|
||||
int (*socket_recv) (struct socket *so, struct msghdr *, caddr_t namelenp, int *retsize);
|
||||
int (*socket_send) (struct socket *so, struct msghdr *, int flags, int *retsize);
|
||||
int (*socket_ioctl) (struct socket *so, int, caddr_t);
|
||||
int (*socket_writev) (struct socket *so, struct iovec *, int flags);
|
||||
int (*socket_readv) (struct socket *so, struct iovec *, int *flags);
|
||||
int (*socket_setsockopt) (struct socket *so, int, int, const void *, size_t);
|
||||
int (*socket_getsockopt) (struct socket *so, int, int, void *, size_t *);
|
||||
int (*socket_getpeername) (struct socket *so, struct sockaddr *, int *);
|
||||
int (*socket_getsockname) (struct socket *so, struct sockaddr *, int *);
|
||||
int (*socket_set_event_callback)(struct socket *so, socket_event_callback, void *, int);
|
||||
};
|
||||
|
||||
#ifdef _KERNEL_MODE
|
||||
@@ -157,4 +158,3 @@ struct core_module_info {
|
||||
#endif
|
||||
|
||||
#endif /* OBOS_CORE_MODULE_H */
|
||||
|
||||
|
||||
@@ -4,35 +4,33 @@
|
||||
#include <sys/socketvar.h>
|
||||
#include <mbuf.h>
|
||||
|
||||
//uint32 sb_max;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/* These are the ones we export to libnet.so */
|
||||
/* These functions are exported through the core module */
|
||||
|
||||
int initsocket(struct socket **);
|
||||
int socreate (int, struct socket *, int, int);//XXX
|
||||
int soshutdown(void *, int);
|
||||
int soclose (void *);
|
||||
int socket_init (struct socket **nso);
|
||||
int socket_create (struct socket *so, int dom, int type, int proto);
|
||||
int socket_shutdown (struct socket *so, int how); // XXX this one is not used at all
|
||||
int socket_close (struct socket *so);
|
||||
|
||||
int sobind (void *, char *, int);
|
||||
int solisten (void *, int);
|
||||
int soconnect (void *, char *, int);
|
||||
int soaccept (struct socket *, struct socket **, void *, int *);
|
||||
int socket_bind (struct socket *so, char *, int);
|
||||
int socket_listen (struct socket *so, int backlog);
|
||||
int socket_connect (struct socket *so, char *, int);
|
||||
int socket_accept (struct socket *so, struct socket **nso, void *, int *);
|
||||
|
||||
int writeit (void *, struct iovec *, int);
|
||||
int readit (void *, struct iovec *, int *);
|
||||
int sendit (void *, struct msghdr *, int, int *);
|
||||
int recvit (void *, struct msghdr *, char *, int *);
|
||||
int socket_writev (struct socket *so, struct iovec *, int flags);
|
||||
int socket_readv (struct socket *so, struct iovec *, int *flags);
|
||||
int socket_send (struct socket *so, struct msghdr *, int flags, int *retsize);
|
||||
int socket_recv (struct socket *so, struct msghdr *, caddr_t namelenp, int *retsize);
|
||||
|
||||
//int so_ioctl (void *, int, void *, size_t);
|
||||
int sosysctl (int *, uint, void *, size_t *, void *, size_t);
|
||||
int sosetopt (void *, int, int, const void *, size_t);
|
||||
int sogetopt (void *, int, int, void *, size_t *);
|
||||
int soo_ioctl(void *sp, int cmd, caddr_t data);
|
||||
int socket_setsockopt (struct socket *so, int, int, const void *, size_t);
|
||||
int socket_getsockopt (struct socket *so, int, int, void *, size_t *);
|
||||
int socket_ioctl (struct socket *so, int cmd, caddr_t data);
|
||||
|
||||
int sogetpeername(void *, struct sockaddr *, int *);
|
||||
int sogetsockname(void *, struct sockaddr *, int *);
|
||||
int socket_getpeername (struct socket *so, struct sockaddr *, int *);
|
||||
int socket_getsockname (struct socket *so, struct sockaddr *, int *);
|
||||
|
||||
int socket_set_event_callback(struct socket *so, socket_event_callback, void *, int);
|
||||
|
||||
|
||||
/* these are all private to the stack...although may be shared with
|
||||
@@ -43,7 +41,6 @@ int sosend(struct socket *so, struct mbuf *addr, struct uio *uio,
|
||||
struct mbuf *top, struct mbuf *control, int flags);
|
||||
|
||||
struct socket *sonewconn(struct socket *head, int connstatus);
|
||||
int set_socket_event_callback(void *, socket_event_callback, void *, int);
|
||||
int soreserve (struct socket *so, uint32 sndcc, uint32 rcvcc);
|
||||
|
||||
void sbrelease (struct sockbuf *sb);
|
||||
|
||||
Reference in New Issue
Block a user