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:
parent
d78b080ef0
commit
91057b0b68
17 changed files with 388 additions and 17 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue