the mpls_inet_addr member is called 'address' in ldp_addr not 'info'
[mpls-ldp-portable.git] / ldp / ldp_pdu.h
blob7f9b91eaa16abb3f4f1d47084f47da50f4b42799
2 /*
3 * Copyright (C) James R. Leu 2000
4 * jleu@mindspring.com
6 * This software is covered under the LGPL, for more
7 * info check out http://www.gnu.org/copyleft/lgpl.html
8 */
10 #ifndef _LDP_PDU_H_
11 #define _LDP_PDU_H_
13 #include "ldp_mm_impl.h"
15 #define MPLS_MSGMALLOC( e ) mplsLdp ## e ## Msg_t *test ## e ## Msg = (mplsLdp ## e ## Msg_t*)ldp_malloc(sizeof(mplsLdp ## e ## Msg_t))
16 #define MPLS_MSGSTRUCT( e ) mplsLdp ## e ## Msg_t test ## e ## Msg
17 #define MPLS_MSGPTR( e ) mplsLdp ## e ## Msg_t *test ## e ## Msg
18 #define MPLS_MSGCAST( e , f ) test ## e ## Msg = (mplsLdp ## e ## Msg_t*) f
19 #define MPLS_MSGPARAM( e ) test ## e ## Msg
21 #include "ldp_struct.h"
23 extern ldp_pdu *ldp_pdu_create();
24 extern ldp_pdu *ldp_pdu_create_decode(ldp_global * g, uint8_t * buf,
25 int buf_size, int data_size);
26 extern void ldp_pdu_delete(ldp_pdu * p);
27 extern int Mpls_encodeLdpPDU(ldp_global * g, uint32_t lsraddr, int label_space,
28 ldp_msg * msg, uint8_t * buf, int buf_size);
29 extern mpls_return_enum Mpls_decodeLdpPDU(ldp_global * g, ldp_pdu * pdu,
30 uint8_t * buf, int size, int n);
32 #endif