1 /* atm.h - Functions useful for ATM applications */
3 /* Written 1995-2000 by Werner Almesberger, EPFL-LRC/ICA */
10 #include <sys/socket.h>
11 #include <linux/atm.h>
15 * For versions of glibc < 2.1
27 #define PF_ATMPVC AF_ATMPVC
31 #define PF_ATMSVC AF_ATMSVC
43 #define HOSTS_ATM "/etc/hosts.atm"
46 #define T2A_PVC 1 /* address is PVC */
47 #define T2A_SVC 2 /* address is SVC */
48 #define T2A_UNSPEC 4 /* allow unspecified parts in PVC address */
49 #define T2A_WILDCARD 8 /* allow wildcards in PVC or SVC address */
50 #define T2A_NNI 16 /* allow NNI VPI range (PVC) */
51 #define T2A_NAME 32 /* allow name resolution */
52 #define T2A_REMOTE 64 /* OBSOLETE */
53 #define T2A_LOCAL 128 /* don't use ANS */
56 #define A2T_PRETTY 1 /* add syntactic sugar */
57 #define A2T_NAME 2 /* attempt name lookup */
58 #define A2T_REMOTE 4 /* OBSOLETE */
59 #define A2T_LOCAL 8 /* don't use ANS */
62 #define AXE_WILDCARD 1 /* allow wildcard match */
63 #define AXE_PRVOPT 2 /* private part of SVC address is optional */
66 #define T2Q_DEFAULTS 1 /* structure contains default values */
69 #define T2S_NAME 1 /* attempt name lookup */
70 #define T2S_LOCAL 2 /* we may support NIS or such in the future */
73 #define S2T_NAME 1 /* attempt name lookup */
74 #define S2T_LOCAL 2 /* we may support NIS or such in the future */
77 #define SXE_COMPATIBLE 1 /* check for compatibility instead of identity*/
78 #define SXE_NEGOTIATION 2 /* allow negotiation; requires SXE_COMPATIBLE;
79 assumes "a" defines the available
81 #define SXE_RESULT 4 /* return selected SAP */
83 #define MAX_ATM_ADDR_LEN (2*ATM_ESA_LEN+ATM_E164_LEN+5)
85 #define MAX_ATM_NAME_LEN 256 /* wild guess */
86 #define MAX_ATM_QOS_LEN 116 /* 5+4+2*(3+3*(7+9)+2)+1 */
87 #define MAX_ATM_SAP_LEN 255 /* BHLI(27)+1+3*BLLI(L2=33,L3=41,+1)+2 */
90 int text2atm(const char *text,struct sockaddr *addr,int length,int flags);
91 int atm2text(char *buffer,int length,const struct sockaddr *addr,int flags);
92 int atm_equal(const struct sockaddr *a,const struct sockaddr *b,int len,
95 int sdu2cell(int s,int sizes,const int *sdu_size,int *num_sdu);
97 int text2qos(const char *text,struct atm_qos *qos,int flags);
98 int qos2text(char *buffer,int length,const struct atm_qos *qos,int flags);
99 int qos_equal(const struct atm_qos *a,const struct atm_qos *b);
101 int text2sap(const char *text,struct atm_sap *sap,int flags);
102 int sap2text(char *buffer,int length,const struct atm_sap *sap,int flags);
103 int sap_equal(const struct atm_sap *a,const struct atm_sap *b,int flags,...);
105 int __t2q_get_rate(const char **text,int up);
106 int __atmlib_fetch(const char **pos,...); /* internal use only */