libisdn
X213.h File Reference
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>

Go to the source code of this file.

Data Structures

struct  nsap_addr_f69
struct  nsap_addr_iso_dcc
struct  nsap_addr_iana_icp
struct  nsap_addr_iso_6523_icd
struct  nsap_addr_x121
struct  nsap_addr_e163
struct  nsap_addr_e164
struct  nsap_addr_itu_t_ind
struct  nsap_addr_local
struct  nsap_addr

Defines

#define icp_a_ip4   icp_addr.ip4
#define icp_a_ip6   icp_addr.ip6
#define nsap_a_x121   ns_addr.x121
#define nsap_a_iso_dcc   ns_addr.iso_dcc
#define nsap_a_f69   ns_addr.f69
#define nsap_a_e163   ns_addr.e163
#define nsap_a_e164   ns_addr.e164
#define nsap_a_iso_6523_icd   ns_addr.iso_6523_icd
#define nsap_a_iana_icp   ns_addr.iana_icp
#define nsap_a_itu_t_ind   ns_addr.itu_t_ind
#define nsap_a_local   ns_addr.local

Enumerations

enum  nsap_idi_format_t {
  NSAP_IDI_NONE = 0, NSAP_IDI_X121, NSAP_IDI_ISO_DCC, NSAP_IDI_F69,
  NSAP_IDI_E163, NSAP_IDI_E164, NSAP_IDI_ISO_6523_ICD, NSAP_IDI_IANA_ICP,
  NSAP_IDI_ITU_T_IND, NSAP_IDI_LOCAL
}
enum  nsap_dsp_syntax_t {
  NSAP_DSP_NONE = 0, NSAP_DSP_DECIMAL, NSAP_DSP_BINARY, NSAP_DSP_ISO_IEC_646,
  NSAP_DSP_NATIONAL
}
enum  {
  NSAPE_NO_ERROR = 0, NSAPE_GENERR = -1, NSAPE_TOO_SHORT = -2, NSAPE_INVALID_FORMAT = -3,
  NSAPE_UNSUPPORTED_FORMAT = -4
}

Functions

int nsap_afi_valid (const char afi)
int nsap_decode (struct nsap_addr *addr, char *buf, int size)
int nsap_print (struct nsap_addr *addr, char *buf, int size)

Define Documentation

#define icp_a_ip4   icp_addr.ip4

Definition at line 69 of file X213.h.

#define icp_a_ip6   icp_addr.ip6

Definition at line 70 of file X213.h.

#define nsap_a_e163   ns_addr.e163

Definition at line 123 of file X213.h.

#define nsap_a_e164   ns_addr.e164

Definition at line 124 of file X213.h.

#define nsap_a_f69   ns_addr.f69

Definition at line 122 of file X213.h.

#define nsap_a_iana_icp   ns_addr.iana_icp

Definition at line 126 of file X213.h.

#define nsap_a_iso_6523_icd   ns_addr.iso_6523_icd

Definition at line 125 of file X213.h.

#define nsap_a_iso_dcc   ns_addr.iso_dcc

Definition at line 121 of file X213.h.

#define nsap_a_itu_t_ind   ns_addr.itu_t_ind

Definition at line 127 of file X213.h.

#define nsap_a_local   ns_addr.local

Definition at line 128 of file X213.h.

#define nsap_a_x121   ns_addr.x121

Definition at line 120 of file X213.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
NSAPE_NO_ERROR 
NSAPE_GENERR 
NSAPE_TOO_SHORT 
NSAPE_INVALID_FORMAT 
NSAPE_UNSUPPORTED_FORMAT 

Definition at line 43 of file X213.h.

Enumerator:
NSAP_DSP_NONE 
NSAP_DSP_DECIMAL 
NSAP_DSP_BINARY 
NSAP_DSP_ISO_IEC_646 
NSAP_DSP_NATIONAL 

Definition at line 35 of file X213.h.

Enumerator:
NSAP_IDI_NONE 
NSAP_IDI_X121 
NSAP_IDI_ISO_DCC 
NSAP_IDI_F69 
NSAP_IDI_E163 
NSAP_IDI_E164 
NSAP_IDI_ISO_6523_ICD 
NSAP_IDI_IANA_ICP 
NSAP_IDI_ITU_T_IND 
NSAP_IDI_LOCAL 

Definition at line 22 of file X213.h.


Function Documentation

int nsap_afi_valid ( const char  afi)

Check whether NSAP AFI can be decoded

Parameters:
[in]afiAFI to check
Returns:
true (1) or false (0)

Definition at line 340 of file X213.c.

Referenced by Q931Die_CalledSub().

int nsap_print ( struct nsap_addr addr,
char *  buf,
int  size 
)

Create textual representation of NSAP address

Parameters:
[in]addrNSAP address
[out]bufOutput buffer
[in]sizeSize of output buffer
Returns:
NSAPE_NO_ERROR on success, NSAPE_* otherwise

Definition at line 405 of file X213.c.

References nsap_addr::dsp, nsap_addr::idi, NSAP_DSP_DECIMAL, NSAP_IDI_E163, NSAP_IDI_E164, NSAP_IDI_F69, NSAP_IDI_IANA_ICP, NSAP_IDI_ISO_6523_ICD, NSAP_IDI_ISO_DCC, NSAP_IDI_ITU_T_IND, NSAP_IDI_LOCAL, NSAP_IDI_X121, and NSAPE_NO_ERROR.

Referenced by Q931Die_CalledSub().