From bf09be1c1e956ff1dad556cac52613d760b62ff1 Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Thu, 10 Jul 2003 01:05:14 +0000 Subject: [PATCH] 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 --- headers/private/net/core_module.h | 1 + headers/private/net/net_stack_driver.h | 25 ++++++++++++------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/headers/private/net/core_module.h b/headers/private/net/core_module.h index 4e521b7d17..67910f282d 100644 --- a/headers/private/net/core_module.h +++ b/headers/private/net/core_module.h @@ -149,6 +149,7 @@ struct core_module_info { 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); + int (*socket_shutdown) (struct socket *so, int how); }; #define NET_CORE_MODULE_NAME "network/core/v1" diff --git a/headers/private/net/net_stack_driver.h b/headers/private/net/net_stack_driver.h index 473d37ec66..410fd599a2 100644 --- a/headers/private/net/net_stack_driver.h +++ b/headers/private/net/net_stack_driver.h @@ -37,8 +37,9 @@ enum { NET_STACK_SYSCTL, // sysctl_args * NET_STACK_SELECT, // select_args * NET_STACK_DESELECT, // select_args * - NET_STACK_ASSOCIATE_SOCKET, // associate_args * - + + NET_STACK_GET_COOKIE, // void ** + NET_STACK_STOP, NET_STACK_NOTIFY_SOCKET_EVENT, // notify_socket_event_args * (userland stack only) @@ -46,11 +47,7 @@ enum { NET_STACK_IOCTL_MAX }; -struct int_args { // used by NET_STACK_LISTEN/_SHUTDOWN - int value; -}; - -struct sockaddr_args { // used by NET_STACK_CONNECT/_BIND/_ACCEPT/_GETSOCKNAME/_GETPEERNAME +struct sockaddr_args { // used by NET_STACK_CONNECT/_BIND/_GETSOCKNAME/_GETPEERNAME struct sockaddr *addr; int addrlen; }; @@ -62,7 +59,7 @@ struct sockopt_args { // used by NET_STACK_SETSOCKOPT/_GETSOCKOPT int optlen; }; -struct xfer_args { // used by NET_STACK_SEND/_RECV +struct transfer_args { // used by NET_STACK_SEND/_RECV void *data; size_t datalen; int flags; @@ -76,8 +73,10 @@ struct socket_args { // used by NET_STACK_SOCKET int proto; }; -struct associate_socket_args { // used by NET_STACK_ASSOCIATE_SOCKET - void *socket; +struct accept_args { // used by NET_STACK_ACCEPT + void *cookie; + struct sockaddr *addr; + int addrlen; }; struct sysctl_args { // used by NET_STACK_SYSCTL @@ -135,12 +134,12 @@ struct r5_selectsync { struct stack_driver_args { union { - struct int_args integer; + int integer; struct socket_args socket; + struct accept_args accept; struct sockaddr_args sockaddr; struct sockopt_args sockopt; - struct associate_socket_args associate; - struct xfer_args xfer; + struct transfer_args transfer; struct sysctl_args sysctl; struct select_args select; } u;