X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-tcl.git;a=blobdiff_plain;f=hbytes%2Fhbytes.h;h=b4fcfb8d551a3481d4e357c5111983ca28075e5e;hp=1bf433bb77e89bf1ef8744498cede5eb0a4242e4;hb=bf917064c5edc75fdd84371f53e7cef51ff05510;hpb=79afa3a523e92a1d552d46729b1e1d04db97f72c diff --git a/hbytes/hbytes.h b/hbytes/hbytes.h index 1bf433b..b4fcfb8 100644 --- a/hbytes/hbytes.h +++ b/hbytes/hbytes.h @@ -65,13 +65,26 @@ * uint VARNAME/VALUE (VARNAME if ul2bitfields; * ulong VARNAME/VALUE VALUE if bitfields2ul) * + * Mask maps: + * + * A maskmap is a slightly efficient mapping from addresses to + * arbitrary data values. An address is a number of octets expressed + * as an hbytes. All the addresses covered by the same maskmap + * should have the same length (even though constructing the maskmap + * does not involve specifying that length). + * * hbytes mask-map lookup MAP-VAR ADDRESS [DEFAULT] => DATA - * error on missing default or if any prefix longer than address + * Error on missing default or if any prefix longer than ADDRESS. + * * hbytes mask-map amend MAP-VAR PREFIX PREFIX-LENGTH DATA - * a maskmap MAP is [list [list PREFIX PREFIX-LENGTH DATA]] sorted - * first by descending PREFIX-LENGTH and then by ascending PREFIX - * each PREFIX _in the map_ is truncated to the shortest number of - * pairs of hex digits which can represent it + * Sets all of the addresses in PREFIX/PREFIX-LENGTH to the + * relevant value. + * + * Representation: + * A maskmap MAP is [list [list PREFIX PREFIX-LENGTH DATA]]. + * The list is sorted by ascending PREFIX and entries do not overlap. + * Each PREFIX in the map is truncated to the shortest number of + * pairs of hex digits which can represent it. * * Error codes * @@ -104,8 +117,7 @@ * TUNTAP IFNAME LENGTH tun/tap interface name too long * TUNTAP MTU OVERRUN tun/tap mtu limited to 2^16 bytes * - * Refs: HMAC: RFC2104 - */ + * Refs: HMAC: RFC2104 */ #ifndef HBYTES_H #define HBYTES_H