Changeset 23:db6c40b8b307 in freeDiameter for freeDiameter/tcp.c
- Timestamp:
- Oct 20, 2009, 5:30:20 PM (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
freeDiameter/tcp.c
r22 r23 37 37 #include <netinet/tcp.h> 38 38 #include <netinet/ip6.h> 39 #include <sys/socket.h> 39 40 40 41 /* Set the socket options for TCP sockets, before bind is called */ … … 111 112 return 0; 112 113 } 114 115 /* Get the local name of a TCP socket -- would be nice if it did not return "0.0.0.0"... */ 116 int fd_tcp_get_local_ep(int sock, sSS * ss, socklen_t *sl) 117 { 118 TRACE_ENTRY("%d %p %p", sock, ss, sl); 119 CHECK_PARAMS( ss && sl ); 120 121 *sl = sizeof(sSS); 122 CHECK_SYS(getsockname(sock, (sSA *)ss, sl)); 123 124 return 0; 125 } 126 127 /* Get the remote name of a TCP socket */ 128 int fd_tcp_get_remote_ep(int sock, sSS * ss, socklen_t *sl) 129 { 130 TRACE_ENTRY("%d %p %p", sock, ss, sl); 131 CHECK_PARAMS( ss && sl ); 132 133 *sl = sizeof(sSS); 134 CHECK_SYS(getpeername(sock, (sSA *)ss, sl)); 135 136 return 0; 137 }
Note: See TracChangeset
for help on using the changeset viewer.