TCP: getsockopt was missing. fixes #1225

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21176 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Hugo Santos 2007-05-20 17:02:27 +00:00
parent 633b979176
commit 98eb7f44f3
2 changed files with 18 additions and 8 deletions

View File

@ -151,13 +151,12 @@ opcode_name(int op)
const char *name;
} *ci, commands_info[] = {
C2N(NET_STACK_SOCKET),
C2N(NET_STACK_GET_COOKIE),
C2N(NET_STACK_CONTROL_NET_MODULE),
C2N(NET_STACK_GET_NEXT_STAT),
C2N(NET_STACK_BIND),
C2N(NET_STACK_RECVFROM),
C2N(NET_STACK_RECV),
C2N(NET_STACK_RECVMSG),
C2N(NET_STACK_SENDTO),
C2N(NET_STACK_RECEIVE),
C2N(NET_STACK_SEND),
C2N(NET_STACK_SENDMSG),
C2N(NET_STACK_LISTEN),
C2N(NET_STACK_ACCEPT),
C2N(NET_STACK_CONNECT),
@ -166,9 +165,8 @@ opcode_name(int op)
C2N(NET_STACK_SETSOCKOPT),
C2N(NET_STACK_GETSOCKNAME),
C2N(NET_STACK_GETPEERNAME),
C2N(NET_STACK_GET_COOKIE),
C2N(NET_STACK_SOCKETPAIR),
C2N(NET_STACK_NOTIFY_SOCKET_EVENT),
C2N(NET_STACK_CONTROL_NET_MODULE),
// Userland IPC-specific opcodes
// C2N(NET_STACK_OPEN),

View File

@ -467,6 +467,18 @@ tcp_control(net_protocol *_protocol, int level, int option, void *value,
}
status_t
tcp_getsockopt(net_protocol *_protocol, int level, int option, void *value,
int *_length)
{
TCPEndpoint *protocol = (TCPEndpoint *)_protocol;
/* TODO getting IPPROTO_TCP options is missing */
return protocol->next->module->getsockopt(protocol->next, level, option,
value, _length);
}
status_t
tcp_setsockopt(net_protocol *_protocol, int level, int option,
const void *_value, int length)
@ -770,7 +782,7 @@ net_protocol_module_info sTCPModule = {
tcp_connect,
tcp_accept,
tcp_control,
NULL, // getsockopt
tcp_getsockopt,
tcp_setsockopt,
tcp_bind,
tcp_unbind,