Cross reference for modules/ip/iproutines.h of index.

# File modules/ip/iproutines.h

      $Revision: 1.6 $

      IP handling (ip). iproutines.h  - header file for conversions routines.
                                        defines data structures for IP module.

      Status: NOT REVUED, TESTED

      Design and implementation by: Marek Bukowy

## Included Files

- `#include </space/dbdev/marek/include/glib.h>`
  - `#include </space/dbdev/marek/lib/glib/include/glibconfig.h>`
    - `#include <limits.h>`
    - `#include <float.h>`
  - `#include <stdarg.h>`

- `#include <include/erroutines.h>`
  - `#include <stdio.h>`
  - `#include <unistd.h>`
  - `#include <stdlib.h>`
  - `#include <assert.h>`
  - `#include <time.h>`
  - `#include <stdarg.h>`
  - `#include <strings.h>`
  - `#include <include/bitmask.h>`
  - `#include <include/er_aspects.h>`
  - `#include <include/stubs.h>`
    - `#include <stdlib.h>`
  - `#include "include/er_facilities.h"`
    - `#include <include/erroutines.h>`
    - `#include "include/er_ER_errors.h"`
    - `#include "include/er_IP_errors.h"`
    - `#include "include/er_RX_errors.h"`
    - `#include "include/er_UT_errors.h"`
    - `#include "include/er_WH_errors.h"`
    - `#include "include/erroutines.h"`

## Preprocessor definitions

`#define _IP_H`

the length of a string that should be able to hold a prefix / range when used with b2a functions.

`#define IP_ADDRSTR_MAX 20`

`#define IP_PREFSTR_MAX 24`

`#define IP_RANGSTR_MAX 48`

`#define IP_addr_e2b( a, b )`

`#define IP_pref_e2b( a, b )`

`#define IP_rang_e2b( a, b )`

`#define IP_addr_a2b( a, b )`

`#define IP_pref_a2b( a, b )`

`#define IP_rang_a2b( a, b )`

## Typedef ip_space_t

the space type

`typedef enum {...} ip_space_t`

`enum` |
`{` |
`IP_V4;` |
`IP_V6;` |
`}` |

## Typedef ip_addr_t

address structure

`typedef struct {...} ip_addr_t`

`struct` |
`{` |
`unsigned int words[4];` | 32/128 bit ip addr. SUBJECT TO CHANGE
`char space;` | char is shorter than ip_space_t but still compatible
`}` |

## Typedef ip_prefix_t

prefix structure

`typedef struct {...} ip_prefix_t`

`struct` |
`{` |
`unsigned bits;` | length in bits.
`ip_addr_t ip;` | the IP of the prefix
`}` |

## Typedef ip_range_t

range structure

`typedef struct {...} ip_range_t`

`struct` |
`{` |
`ip_addr_t begin;` | IP where the range begins.
`ip_addr_t end;` | IP where it ends
`}` |

## Typedef ip_rangesize_t

stores size/span of an allocation SUBJECT TO CHANGE: will be bigger for IPv6

`typedef unsigned int ip_rangesize_t`

## Typedef ip_exp_t

IP expansion mode - for use with t2b functions, they control whether the input is supposed to be fully expanded or contain shortcuts (eg. enabling saying 0/0 instead 0.0.0.0/0)

`typedef enum {...} ip_exp_t`

`enum` |
`{` |
`IP_PLAIN;` |
`IP_EXPN;` |
`}` |

## External Variables

IP_ADDR_UNSPEC
`extern ip_addr_t IP_ADDR_UNSPEC`

Defined in: | modules/ip/ip.c