Export socket_shutdown from core stack module. Rollback to NET_STACK_GET_COOKIE trick...

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3925 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin 2003-07-10 01:05:14 +00:00
parent a9dd5e21ab
commit bf09be1c1e
2 changed files with 13 additions and 13 deletions

View File

@ -149,6 +149,7 @@ struct core_module_info {
int (*socket_getpeername) (struct socket *so, struct sockaddr *, int *); int (*socket_getpeername) (struct socket *so, struct sockaddr *, int *);
int (*socket_getsockname) (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); int (*socket_set_event_callback)(struct socket *so, socket_event_callback, void *, int);
int (*socket_shutdown) (struct socket *so, int how);
}; };
#define NET_CORE_MODULE_NAME "network/core/v1" #define NET_CORE_MODULE_NAME "network/core/v1"

View File

@ -37,8 +37,9 @@ enum {
NET_STACK_SYSCTL, // sysctl_args * NET_STACK_SYSCTL, // sysctl_args *
NET_STACK_SELECT, // select_args * NET_STACK_SELECT, // select_args *
NET_STACK_DESELECT, // select_args * NET_STACK_DESELECT, // select_args *
NET_STACK_ASSOCIATE_SOCKET, // associate_args *
NET_STACK_GET_COOKIE, // void **
NET_STACK_STOP, NET_STACK_STOP,
NET_STACK_NOTIFY_SOCKET_EVENT, // notify_socket_event_args * (userland stack only) NET_STACK_NOTIFY_SOCKET_EVENT, // notify_socket_event_args * (userland stack only)
@ -46,11 +47,7 @@ enum {
NET_STACK_IOCTL_MAX NET_STACK_IOCTL_MAX
}; };
struct int_args { // used by NET_STACK_LISTEN/_SHUTDOWN struct sockaddr_args { // used by NET_STACK_CONNECT/_BIND/_GETSOCKNAME/_GETPEERNAME
int value;
};
struct sockaddr_args { // used by NET_STACK_CONNECT/_BIND/_ACCEPT/_GETSOCKNAME/_GETPEERNAME
struct sockaddr *addr; struct sockaddr *addr;
int addrlen; int addrlen;
}; };
@ -62,7 +59,7 @@ struct sockopt_args { // used by NET_STACK_SETSOCKOPT/_GETSOCKOPT
int optlen; int optlen;
}; };
struct xfer_args { // used by NET_STACK_SEND/_RECV struct transfer_args { // used by NET_STACK_SEND/_RECV
void *data; void *data;
size_t datalen; size_t datalen;
int flags; int flags;
@ -76,8 +73,10 @@ struct socket_args { // used by NET_STACK_SOCKET
int proto; int proto;
}; };
struct associate_socket_args { // used by NET_STACK_ASSOCIATE_SOCKET struct accept_args { // used by NET_STACK_ACCEPT
void *socket; void *cookie;
struct sockaddr *addr;
int addrlen;
}; };
struct sysctl_args { // used by NET_STACK_SYSCTL struct sysctl_args { // used by NET_STACK_SYSCTL
@ -135,12 +134,12 @@ struct r5_selectsync {
struct stack_driver_args { struct stack_driver_args {
union { union {
struct int_args integer; int integer;
struct socket_args socket; struct socket_args socket;
struct accept_args accept;
struct sockaddr_args sockaddr; struct sockaddr_args sockaddr;
struct sockopt_args sockopt; struct sockopt_args sockopt;
struct associate_socket_args associate; struct transfer_args transfer;
struct xfer_args xfer;
struct sysctl_args sysctl; struct sysctl_args sysctl;
struct select_args select; struct select_args select;
} u; } u;