|
@@ -1,6 +1,6 @@
|
|
|
.TH IP 2
|
|
|
.SH NAME
|
|
|
-eipfmt, parseip, parseipmask, v4parseip, v4parsecidr, parseether, myipaddr, myetheraddr, maskip, equivip, defmask, isv4, v4tov6, v6tov4, nhgetl, nhgets, hnputl, hnputs, ptclbsum, readipifc \- Internet protocol
|
|
|
+eipfmt, parseip, parseipmask, v4parseip, v4parsecidr, parseether, myipaddr, myetheraddr, maskip, equivip, defmask, isv4, v4tov6, v6tov4, nhgetv, nhgetl, nhgets, hnputv, hnputl, hnputs, ptclbsum, readipifc \- Internet protocol
|
|
|
.SH SYNOPSIS
|
|
|
.B #include <u.h>
|
|
|
.br
|
|
@@ -57,12 +57,18 @@ ushort nhgets(void *p)
|
|
|
uint nhgetl(void *p)
|
|
|
.PP
|
|
|
.B
|
|
|
+uvlong nhgetv(void *p)
|
|
|
+.PP
|
|
|
+.B
|
|
|
void hnputs(void *p, ushort v)
|
|
|
.PP
|
|
|
.B
|
|
|
void hnputl(void *p, uint v)
|
|
|
.PP
|
|
|
.B
|
|
|
+void hnputv(void *p, uvlong v)
|
|
|
+.PP
|
|
|
+.B
|
|
|
ushort ptclbsum(uchar *a, int n)
|
|
|
.PP
|
|
|
.B
|
|
@@ -211,14 +217,16 @@ converts the V6 address,
|
|
|
to a V4 address and puts the result in
|
|
|
.IR v4ip .
|
|
|
.PP
|
|
|
-.I Hnputs
|
|
|
-and
|
|
|
+.IR Hnputs ,
|
|
|
.I hnputl
|
|
|
-are used to store 16-bit and 32-bit integers into IP big-endian form.
|
|
|
-.I Nhgets
|
|
|
and
|
|
|
+.I hnputv
|
|
|
+are used to store 16-bit, 32-bit, and 64-bit integers, respectively, into IP big-endian form.
|
|
|
+.IR Nhgets ,
|
|
|
.I nhgetl
|
|
|
-convert big-endian 2 and 4 byte quantities into integers.
|
|
|
+and
|
|
|
+.I nhgetv
|
|
|
+convert big-endian 2, 4 and 8 byte quantities into integers (or uvlongs).
|
|
|
.PP
|
|
|
.I Pctlbsum
|
|
|
returns the one's complement checksum used in IP protocols, typically invoked as
|