BRL-CAD
Network Byte-order Conversion
Collaboration diagram for Network Byte-order Conversion:

Files

file  xdr.c
 

Macros

#define BU_GLONGLONG(_cp)
 
#define BU_GLONG(_cp)
 
#define BU_GSHORT(_cp)
 

Functions

DEPRECATED uint16_t bu_gshort (const unsigned char *msgp)
 
DEPRECATED uint32_t bu_glong (const unsigned char *msgp)
 
DEPRECATED unsigned char * bu_pshort (unsigned char *msgp, uint16_t s)
 
DEPRECATED unsigned char * bu_plong (unsigned char *msgp, uint32_t l)
 
DEPRECATED unsigned char * bu_plonglong (unsigned char *msgp, uint64_t l)
 

Detailed Description

Macro Definition Documentation

#define BU_GLONGLONG (   _cp)
Value:
((((uint64_t)((_cp)[0])) << 56) | \
(((uint64_t)((_cp)[1])) << 48) | \
(((uint64_t)((_cp)[2])) << 40) | \
(((uint64_t)((_cp)[3])) << 32) | \
(((uint64_t)((_cp)[4])) << 24) | \
(((uint64_t)((_cp)[5])) << 16) | \
(((uint64_t)((_cp)[6])) << 8) | \
((uint64_t)((_cp)[7])))

DEPRECATED: use ntohll() Macro version of library routine bu_glonglong() The argument is expected to be of type "unsigned char *"

Definition at line 415 of file cv.h.

Referenced by db5_decode_length(), and db5_decode_signed().

#define BU_GLONG (   _cp)
Value:
((((uint32_t)((_cp)[0])) << 24) | \
(((uint32_t)((_cp)[1])) << 16) | \
(((uint32_t)((_cp)[2])) << 8) | \
((uint32_t)((_cp)[3])))

DEPRECATED: use ntohl() Macro version of library routine bu_glong() The argument is expected to be of type "unsigned char *"

Definition at line 429 of file cv.h.

Referenced by db5_decode_length(), and db5_decode_signed().

#define BU_GSHORT (   _cp)
Value:
((((uint16_t)((_cp)[0])) << 8) | \
(_cp)[1])

DEPRECATED: use ntohs() Macro version of library routine bu_gshort() The argument is expected to be of type "unsigned char *"

Definition at line 439 of file cv.h.

Referenced by db5_decode_length(), and db5_decode_signed().

Function Documentation

DEPRECATED uint16_t bu_gshort ( const unsigned char *  msgp)

DEPRECATED: use ntohs()

Definition at line 41 of file xdr.c.

References OSL::Strings::u.

DEPRECATED uint32_t bu_glong ( const unsigned char *  msgp)

DEPRECATED: use ntohl()

Definition at line 63 of file xdr.c.

References OSL::Strings::u.

DEPRECATED unsigned char* bu_pshort ( unsigned char *  msgp,
uint16_t  s 
)

DEPRECATED: use htons()

DEPRECATED unsigned char* bu_plong ( unsigned char *  msgp,
uint32_t  l 
)

DEPRECATED: use htonl()

DEPRECATED unsigned char* bu_plonglong ( unsigned char *  msgp,
uint64_t  l 
)

DEPRECATED: use htonll()