netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gmputil.h File Reference
#include <config.h>
#include <mini-gmp.h>
#include <asm/byteorder.h>
Include dependency graph for gmputil.h:
This graph shows which files directly or indirectly include this file:

Macros

#define gmp_printf   mpz_printf
 

Enumerations

enum  mpz_word_order {
  MPZ_MSWF = 1,
  MPZ_LSWF = -1
}
 
enum  mpz_byte_order {
  MPZ_BIG_ENDIAN = 1,
  MPZ_HOST_ENDIAN = 0,
  MPZ_LITTLE_ENDIAN = -1
}
 

Functions

int mpz_printf (const char *format, const mpz_t value)
 
void mpz_bitmask (mpz_t rop, unsigned int width)
 
void mpz_init_bitmask (mpz_t rop, unsigned int width)
 
void mpz_prefixmask (mpz_t rop, unsigned int width, unsigned int prefix_len)
 
void mpz_lshift_ui (mpz_t rop, unsigned int n)
 
void mpz_rshift_ui (mpz_t rop, unsigned int n)
 
uint64_t mpz_get_uint64 (const mpz_t op)
 
uint32_t mpz_get_uint32 (const mpz_t op)
 
uint16_t mpz_get_uint16 (const mpz_t op)
 
uint8_t mpz_get_uint8 (const mpz_t op)
 
uint64_t mpz_get_be64 (const mpz_t op)
 
uint32_t mpz_get_be32 (const mpz_t op)
 
uint16_t mpz_get_be16 (const mpz_t op)
 
void * mpz_export_data (void *data, const mpz_t op, enum byteorder byteorder, unsigned int len)
 
void mpz_import_data (mpz_t rop, const void *data, enum byteorder byteorder, unsigned int len)
 
void mpz_switch_byteorder (mpz_t rop, unsigned int len)
 

Macro Definition Documentation

#define gmp_printf   mpz_printf

Enumeration Type Documentation

Enumerator
MPZ_BIG_ENDIAN 
MPZ_HOST_ENDIAN 
MPZ_LITTLE_ENDIAN 
Enumerator
MPZ_MSWF 
MPZ_LSWF 

Function Documentation

void mpz_bitmask ( mpz_t  rop,
unsigned int  width 
)

References mpz_set_ui(), mpz_setbit(), and mpz_sub_ui().

Referenced by constant_expr_splice(), mpz_init_bitmask(), and mpz_prefixmask().

Here is the call graph for this function:

Here is the caller graph for this function:

void* mpz_export_data ( void *  data,
const mpz_t  op,
enum byteorder  byteorder,
unsigned int  len 
)

References BYTEORDER_BIG_ENDIAN, BYTEORDER_HOST_ENDIAN, data, MPZ_BIG_ENDIAN, mpz_export(), MPZ_HOST_ENDIAN, MPZ_MSWF, and NULL.

Referenced by constant_expr_join(), mpz_switch_byteorder(), netlink_gen_raw_data(), and symbolic_constant_print().

Here is the call graph for this function:

Here is the caller graph for this function:

uint16_t mpz_get_be16 ( const mpz_t  op)

References MPZ_BIG_ENDIAN, and mpz_get_type.

uint32_t mpz_get_be32 ( const mpz_t  op)

References MPZ_BIG_ENDIAN, and mpz_get_type.

uint64_t mpz_get_be64 ( const mpz_t  op)

References MPZ_BIG_ENDIAN, and mpz_get_type.

uint16_t mpz_get_uint16 ( const mpz_t  op)

References mpz_get_type, and MPZ_HOST_ENDIAN.

uint32_t mpz_get_uint32 ( const mpz_t  op)

References mpz_get_type, and MPZ_HOST_ENDIAN.

uint64_t mpz_get_uint64 ( const mpz_t  op)

References mpz_get_type, and MPZ_HOST_ENDIAN.

uint8_t mpz_get_uint8 ( const mpz_t  op)

References mpz_get_type, and MPZ_HOST_ENDIAN.

void mpz_import_data ( mpz_t  rop,
const void *  data,
enum byteorder  byteorder,
unsigned int  len 
)

References BYTEORDER_BIG_ENDIAN, BYTEORDER_HOST_ENDIAN, MPZ_BIG_ENDIAN, MPZ_HOST_ENDIAN, mpz_import(), and MPZ_MSWF.

Referenced by constant_expr_alloc(), and mpz_switch_byteorder().

Here is the call graph for this function:

Here is the caller graph for this function:

void mpz_init_bitmask ( mpz_t  rop,
unsigned int  width 
)

References mpz_bitmask(), and mpz_init2().

Referenced by interval_map_decompose(), and range_expr_value_high().

Here is the call graph for this function:

Here is the caller graph for this function:

void mpz_lshift_ui ( mpz_t  rop,
unsigned int  n 
)

References mpz_mul_2exp().

Referenced by constant_expr_splice(), flag_expr_alloc(), and mpz_prefixmask().

Here is the call graph for this function:

Here is the caller graph for this function:

void mpz_prefixmask ( mpz_t  rop,
unsigned int  width,
unsigned int  prefix_len 
)

References mpz_bitmask(), and mpz_lshift_ui().

Here is the call graph for this function:

int mpz_printf ( const char *  format,
const mpz_t  value 
)

References expr::base, len, mpz_get_str(), mpz_sizeinbase(), and NULL.

Here is the call graph for this function:

void mpz_rshift_ui ( mpz_t  rop,
unsigned int  n 
)

References mpz_tdiv_q_2exp().

Referenced by constant_expr_splice().

Here is the call graph for this function:

Here is the caller graph for this function:

void mpz_switch_byteorder ( mpz_t  rop,
unsigned int  len 
)

References BYTEORDER_BIG_ENDIAN, BYTEORDER_HOST_ENDIAN, data, len, mpz_export_data(), and mpz_import_data().

Here is the call graph for this function: