Changeset 526 for trunk/src/sh_ipvx.c
- Timestamp:
- Jun 29, 2017, 9:20:32 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_ipvx.c
r509 r526 251 251 } 252 252 253 int sh_ipvx_get_port(struct s ockaddr * sa, int sa_family)253 int sh_ipvx_get_port(struct sh_sockaddr * sa) 254 254 { 255 255 int port = 0; 256 256 #if defined(USE_IPVX) 257 257 258 switch (sa _family)258 switch (sa->ss_family) 259 259 { 260 260 case AF_INET: 261 port = ntohs(( (struct sockaddr_in *)sa)->sin_port);261 port = ntohs((sa->sin).sin_port); 262 262 break; 263 263 case AF_INET6: 264 port = ntohs(((struct sockaddr_in6 *)sa)->sin6_port); 265 break; 266 } 267 #else 268 (void) sa_family; 269 port = ntohs(((struct sockaddr_in *)sa)->sin_port); 264 port = ntohs((sa->sin6).sin6_port); 265 break; 266 } 267 #else 268 port = ntohs((sa->sin).sin_port); 270 269 #endif 271 270 return port;
Note:
See TracChangeset
for help on using the changeset viewer.