diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-19 03:20:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:08:59 -0500 |
commit | 8783aa8ea57c3a6989e0722d5184e98d543352d4 (patch) | |
tree | 93df839740cf04b88ec6ff9f81fcde5c99e77951 /source4/lib/socket/socket_ipv6.c | |
parent | 6c310003d21fe832da46bbfeb078f716d87be04f (diff) | |
download | samba-8783aa8ea57c3a6989e0722d5184e98d543352d4.tar.gz samba-8783aa8ea57c3a6989e0722d5184e98d543352d4.tar.bz2 samba-8783aa8ea57c3a6989e0722d5184e98d543352d4.zip |
r4831: added udp support to our generic sockets library.
I decided to incorporate the udp support into the socket_ipv4.c
backend (and later in socket_ipv6.c) rather than doing a separate
backend, as so much of the code is shareable. Basically this adds a
socket_sendto() and a socket_recvfrom() call and not much all.
For udp servers, I decided to keep the call as socket_listen(), even
though dgram servers don't actually call listen(). This keeps the API
consistent.
I also added a simple local sockets testsuite in smbtorture,
LOCAL-SOCKET
(This used to be commit 9f12a45a05c5c447fb4ec18c8dd28f70e90e32a5)
Diffstat (limited to 'source4/lib/socket/socket_ipv6.c')
-rw-r--r-- | source4/lib/socket/socket_ipv6.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/lib/socket/socket_ipv6.c b/source4/lib/socket/socket_ipv6.c index 35b4037ff4..27e452b14e 100644 --- a/source4/lib/socket/socket_ipv6.c +++ b/source4/lib/socket/socket_ipv6.c @@ -347,8 +347,6 @@ static int ipv6_tcp_get_fd(struct socket_context *sock) static const struct socket_ops ipv6_tcp_ops = { .name = "ipv6", - .type = SOCKET_TYPE_STREAM, - .fn_init = ipv6_tcp_init, .fn_connect = ipv6_tcp_connect, .fn_connect_complete = ipv6_tcp_connect_complete, @@ -369,7 +367,10 @@ static const struct socket_ops ipv6_tcp_ops = { .fn_get_fd = ipv6_tcp_get_fd }; -const struct socket_ops *socket_ipv6_ops(void) +const struct socket_ops *socket_ipv6_ops(enum socket_type type) { + if (type != SOCKET_TYPE_STREAM) { + return NULL; + } return &ipv6_tcp_ops; } |