45 lines · 818 B · Text
RawDownload
.TH GETBE 2.SH NAMEgetbe, putbe, getle, putle \- integer marshalling.SH SYNOPSIS.ta +\w'\fLuvlong 'u.PP.nf.Buvlong	getbe(uchar *buf, int nbytes).PP.nf.Bvoid	putbe(uchar *buf, uvlong v, int nbytes).PP.nf.Buvlong	getle(uchar *buf, int nbytes).PP.nf.Bvoid	putle(uchar *buf, uvlong v, int nbytes).SH DESCRIPTIONThese functions marshal a 1- to 8-byte integer toor from little- or big-endian formats.  The sizeof the integer is specified in bytes, and is not restrictedto a power of two..SH SOURCE.B /sys/src/libc/port/getbe.c.SH "SEE ALSO".IR fcall (2),.IR ip (2).SH BUGS.IR GBIT *and .IR PBIT *(from.IR fcall (2))provide similar functionality for little-endian integers.The.IR nhget *and.IR nhput *functions from.IR ip (2)provide similar functionality  for big-endian integers.