1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-09 13:46:33 +00:00

ported generic socket to *BSD; minor improvements

This commit is contained in:
Gerhard Rieger 2008-08-17 23:28:11 +02:00
parent 8947cc92dc
commit 13b73776e7
37 changed files with 1441 additions and 258 deletions

View file

@ -37,6 +37,10 @@ const struct addrname addressnames[] = {
{ "creat", &addr_creat },
{ "create", &addr_creat },
#endif
#if WITH_GENERICSOCKET
{ "datagram", &xioaddr_socket_datagram },
{ "dgram", &xioaddr_socket_datagram },
#endif
#if WITH_PIPE
{ "echo", &addr_pipe },
#endif
@ -131,6 +135,17 @@ const struct addrname addressnames[] = {
#if WITH_READLINE
{ "readline", &addr_readline },
#endif
#if WITH_GENERICSOCKET
{ "sendto", &xioaddr_socket_sendto },
#endif
#if WITH_GENERICSOCKET
{ "socket-connect", &xioaddr_socket_connect },
{ "socket-datagram", &xioaddr_socket_datagram },
{ "socket-listen", &xioaddr_socket_listen },
{ "socket-recv", &xioaddr_socket_recv },
{ "socket-recvfrom", &xioaddr_socket_recvfrom },
{ "socket-sendto", &xioaddr_socket_sendto },
#endif
#if WITH_SOCKS4
{ "socks", &addr_socks4_connect },
{ "socks4", &addr_socks4_connect },
@ -296,9 +311,9 @@ static xiofile_t *xioallocfd(void) {
fd->stream.fd = -1;
fd->stream.dtype = XIODATA_STREAM;
#if WITH_SOCKET
#if _WITH_SOCKET
/* fd->stream.salen = 0; */
#endif /* WITH_SOCKET */
#endif /* _WITH_SOCKET */
fd->stream.howtoend = END_UNSPEC;
/* fd->stream.name = NULL; */
/* fd->stream.para.exec.pid = 0; */