.TH ip4_fmt 3 .SH NAME ip4_fmt \- write a formatted ASCII representation of an IPv4 number .SH SYNTAX .B #include unsigned int \fBip4_fmt\fP(char *\fIdest\fR,const char \fIip\fR[4]); .SH DESCRIPTION ip4_fmt formats an IPv4 number in dotted-decimal ASCII representation from \fIip\fR and writes the result into \fIdest\fR. It returns the number of bytes written. If \fIdest\fR equals FMT_LEN (i.e. is zero), ip4_fmt returns the number of bytes it would have written. ip4_fmt does not append \\0. For convenience, ip4.h defines the integer IP4_FMT to be big enough to contain every possible ip4_fmt output plus \\0. .SH EXAMPLE #include char buf[IP4_FMT]; char ip[4]; buf[ip4_fmt(buf,ip)]=0; .SH "SEE ALSO" ip4_scan(3), ip6_fmt(3)