3 * Copyright (C) James R. Leu 2000
6 * This software is covered under the LGPL, for more
7 * info check out http://www.gnu.org/copyleft/lgpl.html
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
);