1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-06 04:56:33 +00:00

merged feature sctp streams

This commit is contained in:
Gerhard Rieger 2008-09-22 23:21:26 +02:00
parent d78b080ef0
commit 91057b0b68
17 changed files with 388 additions and 17 deletions

View file

@ -423,7 +423,9 @@ int xiopoll(struct pollfd fds[], nfds_t nfds, int timeout) {
#if WITH_TCP || WITH_UDP
/* returns port in network byte order */
/* returns port in network byte order;
ipproto==IPPROTO_UDP resolves as UDP service, every other value resolves as
TCP */
int parseport(const char *portname, int ipproto) {
struct servent *se;
char *extra;
@ -438,7 +440,7 @@ int parseport(const char *portname, int ipproto) {
return result;
}
if ((se = getservbyname(portname, ipproto==IPPROTO_TCP?"tcp":"udp")) == NULL) {
if ((se = getservbyname(portname, ipproto==IPPROTO_UDP?"udp":"tcp")) == NULL) {
Error2("cannot resolve service \"%s/%d\"", portname, ipproto);
return 0;
}