mode_hdr.h File Reference

#include <string.h>
#include <limits.h>
#include "brg_endian.h"
#include "brg_types.h"
#include "gcm_aes.h"

Go to the source code of this file.

Defines

#define BFR_UNIT   64
#define USE_INLINING
#define NEED_UINT_64T
#define mh_inline   static
#define ui8_ptr(x)   ptr_cast(x, 8)
#define ui16_ptr(x)   ptr_cast(x, 16)
#define ui32_ptr(x)   ptr_cast(x, 32)
#define ui64_ptr(x)   ptr_cast(x, 64)
#define unit_ptr(x)   ptr_cast(x, BFR_UNIT)
#define BUF_INC   (BFR_UNIT >> 3)
#define BUF_ADRMASK   ((BFR_UNIT >> 3) - 1)
#define uint_32t_to_le(x)
#define uint_64t_to_le(x)
#define uint_32t_to_be(x)   (x) = bswap_32((x))
#define uint_64t_to_be(x)   (x) = bswap_64((x))

Typedefs

typedef void(* xor_function )(void *, const void *q)

Functions

mh_inline uint_32t rotl32 (uint_32t x, int n)
mh_inline uint_32t rotr32 (uint_32t x, int n)
mh_inline uint_64t rotl64 (uint_64t x, int n)
mh_inline uint_64t rotr64 (uint_64t x, int n)
mh_inline uint_32t bswap_32 (uint_32t x)
mh_inline uint_64t bswap_64 (uint_64t x)
mh_inline void bswap32_block (void *d, const void *s, int n)
mh_inline void bswap64_block (void *d, const void *s, int n)
mh_inline void move_block (void *p, const void *q)
mh_inline void move_block_aligned (void *p, const void *q)
mh_inline void xor_block (void *p, const void *q)
mh_inline void xor_block_aligned (void *p, const void *q)


Define Documentation

#define BFR_UNIT   64

Definition at line 50 of file mode_hdr.h.

#define BUF_ADRMASK   ((BFR_UNIT >> 3) - 1)

Definition at line 116 of file mode_hdr.h.

#define BUF_INC   (BFR_UNIT >> 3)

Definition at line 115 of file mode_hdr.h.

#define mh_inline   static

Definition at line 101 of file mode_hdr.h.

#define NEED_UINT_64T

Definition at line 88 of file mode_hdr.h.

#define ui16_ptr (  )     ptr_cast(x, 16)

Definition at line 110 of file mode_hdr.h.

#define ui32_ptr (  )     ptr_cast(x, 32)

Definition at line 111 of file mode_hdr.h.

#define ui64_ptr (  )     ptr_cast(x, 64)

Definition at line 112 of file mode_hdr.h.

#define ui8_ptr (  )     ptr_cast(x, 8)

Definition at line 109 of file mode_hdr.h.

Referenced by xor_block().

#define uint_32t_to_be (  )     (x) = bswap_32((x))

Definition at line 309 of file mode_hdr.h.

#define uint_32t_to_le (  ) 

Definition at line 307 of file mode_hdr.h.

#define uint_64t_to_be (  )     (x) = bswap_64((x))

Definition at line 310 of file mode_hdr.h.

#define uint_64t_to_le (  ) 

Definition at line 308 of file mode_hdr.h.

#define unit_ptr (  )     ptr_cast(x, BFR_UNIT)

Definition at line 113 of file mode_hdr.h.

Referenced by move_block_aligned(), and xor_block_aligned().

#define USE_INLINING

Definition at line 63 of file mode_hdr.h.


Typedef Documentation

typedef void(* xor_function)(void *, const void *q)

Definition at line 120 of file mode_hdr.h.


Function Documentation

mh_inline void bswap32_block ( void *  d,
const void *  s,
int  n 
)

Definition at line 170 of file mode_hdr.h.

References bswap_32().

mh_inline void bswap64_block ( void *  d,
const void *  s,
int  n 
)

Definition at line 176 of file mode_hdr.h.

References bswap_64().

mh_inline uint_32t bswap_32 ( uint_32t  x  ) 

Definition at line 157 of file mode_hdr.h.

References rotr32().

Referenced by bswap32_block(), and bswap_64().

mh_inline uint_64t bswap_64 ( uint_64t  x  ) 

Definition at line 164 of file mode_hdr.h.

References bswap_32().

Referenced by bswap64_block().

mh_inline void move_block ( void *  p,
const void *  q 
)

Definition at line 220 of file mode_hdr.h.

Referenced by move_block_aligned().

mh_inline void move_block_aligned ( void *  p,
const void *  q 
)

Definition at line 225 of file mode_hdr.h.

References move_block(), and unit_ptr.

mh_inline uint_32t rotl32 ( uint_32t  x,
int  n 
)

Definition at line 127 of file mode_hdr.h.

mh_inline uint_64t rotl64 ( uint_64t  x,
int  n 
)

Definition at line 141 of file mode_hdr.h.

mh_inline uint_32t rotr32 ( uint_32t  x,
int  n 
)

Definition at line 134 of file mode_hdr.h.

Referenced by bswap_32().

mh_inline uint_64t rotr64 ( uint_64t  x,
int  n 
)

Definition at line 148 of file mode_hdr.h.

mh_inline void xor_block ( void *  p,
const void *  q 
)

Definition at line 237 of file mode_hdr.h.

References ui8_ptr.

Referenced by xor_block_aligned().

mh_inline void xor_block_aligned ( void *  p,
const void *  q 
)

Definition at line 249 of file mode_hdr.h.

References unit_ptr, and xor_block().


Generated on Fri Jan 30 09:43:11 2009 for DTN Reference Implementation by  doxygen 1.5.8