1 .TH IPSEC_PORTOF 3 "8 Sept 2000"
2 .\" RCSID $Id: portof.3,v 1.2 2000/09/08 18:09:09 henry Exp $
4 ipsec portof \- get port field of an ip_address
6 ipsec setportof \- set port field of an ip_address
8 ipsec sockaddrof \- get pointer to internal sockaddr of an ip_address
10 ipsec sockaddrlenof \- get length of internal sockaddr of an ip_address
12 .B "#include <freeswan.h>"
14 .B "int portof(const ip_address *src);"
16 .B "void setportof(int port, ip_address *dst);"
18 .B "struct sockaddr *sockaddrof(ip_address *src);"
20 .B "size_t sockaddrlenof(const ip_address *src);"
29 \fIReliance on this feature is discouraged\fR,
30 but it may occasionally be necessary.
31 These functions provide low-level tools for this purpose.
36 respectively read and write the port-number field of the internal
38 The values are in network byte order.
41 returns a pointer to the internal
43 for passing to other functions.
46 reports the size of the internal
48 for use in storage allocation.
50 inet(3), ipsec_initaddr(3)
62 if an unknown address family is found within the
65 Written for the FreeS/WAN project by Henry Spencer.
67 These functions all depend on low-level details of the
69 type, which are in principle subject to change.
70 Avoid using them unless really necessary.