File: scan_ip6_flat.3

package info (click to toggle)
libowfat 0.34-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,288 kB
  • sloc: ansic: 20,181; makefile: 16
file content (27 lines) | stat: -rw-r--r-- 780 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.TH scan_ip6_flat 3
.SH NAME
scan_ip6_flat \- parse an IPv6 number in flat ASCII representation
.SH SYNTAX
.B #include <libowfat/ip6.h>

int \fBscan_ip6_flat\fP(const char *\fIsrc\fR,char \fIip\fR[16]);
.SH DESCRIPTION
scan_ip6_flat parses an IPv6 number in flat ASCII representation
from \fIsrc\fR and writes the result into \fIip\fR. It returns the
number of bytes read from \fIsrc\fR or 0 if the parsing failed.

scan_ip6_flat accepts upper and lower case hex letters.

The flat representation should have been output by fmt_ip6_flat.
.SH EXAMPLE
#include <libowfat/str.h>
.br
#include <libowfat/ip6.h>

  char buf[]="00000000000000000000000000000001";
  char ip[16];
  if (scan_ip6_flat(buf,ip) != str_len(buf))
    parse_error();

.SH "SEE ALSO"
fmt_ip6_flat(3), scan_ip6(3)