#include "libnjb.h"
#include "byteorder.h"
Functions | |
u_int64_t | njb1_bytes_to_64bit (unsigned char *dp) |
void | from_64bit_to_njb1_bytes (u_int64_t val, unsigned char *dp) |
u_int32_t | njb1_bytes_to_32bit (unsigned char *dp) |
u_int32_t | njb3_bytes_to_32bit (unsigned char *dp) |
void | from_32bit_to_njb1_bytes (u_int32_t val, unsigned char *dp) |
void | from_32bit_to_njb3_bytes (u_int32_t val, unsigned char *dp) |
u_int16_t | njb1_bytes_to_16bit (unsigned char *dp) |
u_int16_t | njb3_bytes_to_16bit (unsigned char *dp) |
void | from_16bit_to_njb1_bytes (u_int16_t val, unsigned char *dp) |
void | from_16bit_to_njb3_bytes (u_int16_t val, unsigned char *dp) |
u_int16_t | get_msw (u_int32_t word) |
u_int16_t | get_lsw (u_int32_t word) |
u_int64_t | make64 (u_int32_t msdw, u_int32_t lsdw) |
void | split64 (u_int64_t num, u_int32_t *msdw, u_int32_t *lsdw) |
NJB1 and the "series 3 family" (NJB2, NJB3, NJB Zen, NJB Zen 2.0) have different byte ordering. NJB1 is essentially big-endian, and the series 3 family little-endian. The terminology could be confusing, so we refer to the different endiannesses as "njb1-endian" and "njb3-endian".
|
This function will write the
|
|
This function will write the
|
|
This function will write the
|
|
This function will write the
|
|
This function will write the
|
|
This simply extract the least significant 16 bit parts of a 32 bit word.
|
|
This simply extract the most significant 16 bit parts of a 32 bit word.
|
|
Create a 64 bit unsigned integer from two 32 bit integers representing the most/least significant part of it.
|
|
This function will take 2 bytes from the NJB1-endian byte array pointed to by
|
|
This function will take 4 bytes from the NJB1-endian byte array pointed to by
|
|
This function will take 8 bytes from the njb1-endian byte array pointed to by
|
|
This function will take 2 bytes from the series 3-endian byte array pointed to by
|
|
This function will take 4 bytes from the series 3-endian byte array pointed to by
|
|
Split a 64 bit unsigned integer into two unsigned 32 bit integer representing the most/least significant 32 bits of the incoming 64 bit integer.
|