TRIP Routing Daemon
TRIP (RFC 3219) Location Server Implementation
Loading...
Searching...
No Matches
protocol.h
Go to the documentation of this file.
1/*
2
3 trip: Modern TRIP LS implementation
4 Copyright (C) 2025 arf20 (Ángel Ruiz Fernandez)
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <https://www.gnu.org/licenses/>.
18
19*/
20
24
25#ifndef _PROTOCOL_H
26#define _PROTOCOL_H
27
28#include <stdint.h>
29#include <stddef.h>
30
31
32#define MAX_MSG_SIZE 4096
33
34
37 MSG_TYPE_OPEN = 1,
38 MSG_TYPE_UPDATE,
39 MSG_TYPE_NOTIFICATION,
40 MSG_TYPE_KEEPALIVE
41};
42
44extern const char *msg_type_strs[];
45
47typedef struct __attribute__((packed)) {
48 uint16_t msg_len;
49 uint8_t msg_type;
50 uint8_t msg_val[];
51} msg_t;
52
53
56 OPEN_OPT_TYPE_CAPABILITY_INFO = 1,
57};
58
60extern const char *open_opt_type_strs[];
61
63typedef struct __attribute__((packed)) {
64 uint16_t opt_type;
65 uint16_t opt_len;
66 uint8_t opt_val[];
67} msg_open_opt_t;
68
70#define PROTOCOL_VERSION 1
71
73typedef struct __attribute__((packed)) {
74 uint8_t open_ver;
75 uint8_t open_reserved;
76 uint16_t open_hold;
77 uint32_t open_itad;
78 uint32_t open_id;
79 uint16_t open_opts_len;
80 msg_open_opt_t open_opts[];
81} msg_open_t;
82
83
86 CAPINFO_CODE_ROUTETYPE = 1,
87 CAPINFO_CODE_TRANSMODE
88};
89
91extern const char *capinfo_code_strs[];
92
94typedef struct __attribute__((packed)) {
95 uint16_t capinfo_code;
96 uint16_t capinfo_len;
97 uint8_t capinfo_val[];
98} capinfo_t;
99
100
102typedef struct __attribute__((packed)) {
103 uint16_t routetype_af;
104 uint16_t routetype_app_proto;
105} capinfo_routetype_t;
106
107
110 CAPINFO_TRANS_SEND_RECV = 1,
111 CAPINFO_TRANS_SEND,
112 CAPINFO_TRANS_RECV
113};
114
116extern const char *capinfo_transmode_strs[];
117
121#define CAPINFO_TRANS_NULL (uint32_t)-1
122
124typedef uint32_t capinfo_transmode_t;
125
126
141#define IS_ATTR_FLAG_WELL_KNOWN(x) ((x >> 0) & 1)
142#define IS_ATTR_FLAG_TRANSITIVE(x) ((x >> 1) & 1)
143#define IS_ATTR_FLAG_DEPENDENT(x) ((x >> 2) & 1)
144#define IS_ATTR_FLAG_PARTIAL(x) ((x >> 3) & 1)
145#define IS_ATTR_FLAG_LSENCAP(x) ((x >> 4) & 1)
146
147#define ATTR_FLAG_WELL_KNOWN 0b00000001
148#define ATTR_FLAG_TRANSITIVE 0b00000010
149#define ATTR_FLAG_DEPENDENT 0b00000100
150#define ATTR_FLAG_PARTIAL 0b00001000
151#define ATTR_FLAG_LSENCAP 0b00010000
152
157 ATTR_TYPE_REACHABLEROUTES,
158 ATTR_TYPE_NEXTHOPSERVER,
159 ATTR_TYPE_ADVERTISEMENTPATH,
160 ATTR_TYPE_ROUTEDPATH,
161 ATTR_TYPE_ATOMICAGGREGATE,
162 ATTR_TYPE_LOCALPREFERENCE,
163 ATTR_TYPE_MULTIEXITDISC,
164 ATTR_TYPE_COMMUNITIES,
165 ATTR_TYPE_ITADTOPOLOGY,
166 ATTR_TYPE_CONVERTEDROUTE,
171 ATTR_TYPE_AVAILABLECIRCUITS,
172 ATTR_TYPE_CALLSUCCESS,
173 ATTR_TYPE_E164PREFIX,
174 ATTR_TYPE_PENTADECPREFIX,
175 ATTR_TYPE_DECIMALPREFIX,
176 ATTR_TYPE_TRUNKGROUP,
177 ATTR_TYPE_CARRIER
178};
179
181typedef struct __attribute__((packed)) {
182 uint8_t attr_flags;
183 uint8_t attr_type;
184 uint16_t attr_len;
185 uint8_t attr_val[];
186} msg_update_attr_t;
187
189typedef struct __attribute__((packed)) {
190 uint8_t attr_flags;
191 uint8_t attr_type;
192 uint16_t attr_len;
193 uint32_t attr_id;
194 uint32_t attr_seq;
195 uint8_t attr_val[];
196} msg_update_attr_lsencap_t;
197
198
199/* attributes */
200
201
203enum af {
204 /* RFC3219 */
205 AF_DECIMAL = 1,
206 AF_PENTADECIMAL,
207 AF_E164,
208 /* RFC5140 */
209 AF_TRUNKGROUP,
210 AF_CARRIER
211};
212
214extern const char *af_strs[];
215
227
229const char *app_proto_str(int app_proto);
230
232typedef struct __attribute__((packed)) {
233 uint16_t route_af;
234 uint16_t route_app_proto;
235 uint16_t route_len;
236 char route_addr[];
237} route_t;
238
244typedef route_t attr_withdrawnroutes_t[];
245
246
252typedef route_t attr_reachableroutes_t[];
253
254
262
263typedef struct __attribute__((packed)) {
264 uint32_t nexthopserver_itad;
265 uint16_t nexthopserver_serverlen;
266 char nexthopserver_server[];
267} attr_nexthopserver_t;
268
269
272 ITADPATH_TYPE_AP_SET = 1,
273 ITADPATH_TYPE_AP_SEQUENCE
274};
275
277typedef struct __attribute__((packed)) {
278 uint8_t itadpath_type;
279 uint8_t itadpath_len;
280 uint32_t itadpath_segs[];
281} itadpath_t;
282
289typedef itadpath_t attr_advertisementpath_t;
290
291
298typedef itadpath_t attr_routedpath_t;
299
300
307
308
310typedef uint32_t attr_localpref_t;
311
312
317typedef uint32_t attr_multiexitdisc_t;
318
319
321typedef struct __attribute__((packed)) {
322 uint32_t community_itad;
323 uint32_t community_id;
324} community_t;
325
327#define COMMUNITY_NO_EXPORT ((community_t){ 0x00000000, 0xffffff01 })
328
334typedef community_t attr_communities_t[];
335
336
342typedef uint32_t attr_itadtopology_t[];
343
344
351
352
353/* future RFC5115 and RFC5140 attributes go here */
354
355
360typedef void msg_keepalive_t;
361
362
365 NOTIF_CODE_ERROR_MSG = 1,
366 NOTIF_CODE_ERROR_OPEN,
367 NOTIF_CODE_ERROR_UPDATE,
368 NOTIF_CODE_ERROR_EXPIRED,
369 NOTIF_CODE_ERROR_STATE,
370 NOTIF_CODE_CEASE
371};
372
374extern const char *notif_code_strs[];
375
378 NOTIF_SUBCODE_MSG_BAD_LEN = 1,
379 NOTIF_SUBCODE_MSG_BAD_TYPE
380};
381
383extern const char *notif_subcode_msg_strs[];
384
387 NOTIF_SUBCODE_OPEN_UNSUP_VERSION = 1,
388 NOTIF_SUBCODE_OPEN_BAD_ITAD,
389 NOTIF_SUBCODE_OPEN_BAD_ID,
390 NOTIF_SUBCODE_OPEN_UNSUP_OPT,
391 NOTIF_SUBCODE_OPEN_BAD_HOLD,
392 NOTIF_SUBCODE_OPEN_UNSUP_CAP,
393 NOTIF_SUBCODE_OPEN_CAP_MISMATCH
394};
395
397extern const char *notif_subcode_open_strs[];
398
401 NOTIF_SUBCODE_UPDATE_MALFORM_ATTR = 1,
402 NOTIF_SUBCODE_UPDATE_UNK_WELLKNOWN_ATTR,
403 NOTIF_SUBCODE_UPDATE_MISS_WELLKNOWN_ATTR,
404 NOTIF_SUBCODE_UPDATE_BAD_ATTR_FLAG,
405 NOTIF_SUBCODE_UPDATE_BAD_ATTR_LEN,
406 NOTIF_SUBCODE_UPDATE_INVAL_ATTR
407};
408
410extern const char *notif_subcode_update_strs[];
411
413extern const char **notif_code_subcodes_strs[];
414
416typedef struct __attribute__((packed)) {
417 uint8_t notif_error_code;
418 uint8_t notif_error_subcode;
419 uint8_t notif_data[];
420} msg_notif_t;
421
422
423/* serialization/deserialization functions */
424
449
451extern const char *runtime_error_strs[];
452
453
454/* default timers */
455
456#define TIMER_CONNECT_RETRY 120
457#define TIMER_HOLD_TIME 90
458#define TIMER_KEEPALIVE 30
459#define TIMER_MAX_PURGE_TIME 10
460#define TIMER_DISABLE_TIME 180
461#define TIMER_MIN_ITAD_ORIG_INT 30
462#define TIMER_MIN_ROUTE_ADVERT_INT 30
463
464
465
466/* objects */
467
469extern const capinfo_routetype_t supported_routetypes[];
471extern const size_t supported_routetypes_size;
472
473
474/* macros */
475
477#define PROTO_TCP_PORT 6069
478
480#define PROTO_TRY(o, res, a) \
481 res = o; \
482 if (res < 0) { \
483 ERROR("protocol error: %s", runtime_error_strs[-res]); \
484 a; \
485 }
486
487
488/* message serializers
489 * sizes are in element count, not bytes
490 */
491
493runtime_error_t new_msg_open(void *buff, size_t len, uint16_t hold,
494 uint32_t itad, uint32_t id, const capinfo_routetype_t *capinfo_routetypes,
495 size_t routetypes_size, capinfo_transmode_t capinfo_transmode);
496
498runtime_error_t new_msg_update(void *buff, size_t len,
499 const msg_update_attr_t **attrs, size_t attrs_size);
500
502runtime_error_t new_msg_keepalive(void *buff, size_t len);
503
505runtime_error_t new_msg_notif(void *buff, size_t len, uint8_t error_code,
506 uint8_t error_subcode, size_t datalen, const void *data);
507
508
509/* UPDATE attribute serializers */
510
512runtime_error_t new_attr_withdrawnroutes(void *buff, size_t len, int lsencap,
513 uint32_t id, uint32_t seq, const route_t **routes, size_t routes_size);
514
516runtime_error_t new_attr_reachableroutes(void *buff, size_t len, int lsencap,
517 uint32_t id, uint32_t seq, const route_t **routes, size_t routes_size);
518
520runtime_error_t new_attr_nexthopserver(void *buff, size_t len,
521 uint32_t next_itad, const char *server);
522
524runtime_error_t new_attr_advertisementpath(void *buff, size_t len,
525 const itadpath_t *path);
526
528runtime_error_t new_attr_routedpath(void *buff, size_t len,
529 const itadpath_t *path);
530
532runtime_error_t new_attr_atomicaggregate(void *buff, size_t len);
533
535runtime_error_t new_attr_localpref(void *buff, size_t len, uint32_t localpref);
536
538runtime_error_t new_attr_multiexitdisc(void *buff, size_t len, uint32_t metric);
539
541runtime_error_t new_attr_communities(void *buff, size_t len,
542 const community_t *communities, size_t communities_size);
543
545runtime_error_t new_attr_itadtopology(void *buff, size_t len, uint32_t id,
546 uint32_t seq, const uint32_t *itads, size_t itads_size);
547
549runtime_error_t new_attr_convertedroute(void *buff, size_t len);
550
551
552/* deserializers */
553
554/* messages */
555
557runtime_error_t parse_msg(const void *buff, size_t len, const msg_t **msg_out);
558
559
560/* message OPEN
561 */
562
564runtime_error_t parse_msg_open(const void *buff, size_t len,
565 const msg_open_t **open_out);
566
568runtime_error_t parse_msg_open_opt(const void *buff, size_t len,
569 const msg_open_opt_t **opt_out);
570
572runtime_error_t parse_capinfo(const void *buff, size_t len,
573 const capinfo_t **capinfo_out);
574
576runtime_error_t parse_capinfo_routetype(const void *buff, size_t len,
577 const capinfo_routetype_t **routetype_out);
578
580runtime_error_t parse_capinfo_transmode(const void *buff, size_t len,
581 const capinfo_transmode_t **transmode_out);
582
583
584/* message UPDATE
585 * list of attributes
586 */
587
589runtime_error_t parse_msg_update_attr(const void *buff, size_t len,
590 const msg_update_attr_t **attr_out);
591
593runtime_error_t parse_msg_update_attr_lsencap(const void *buff, size_t len,
594 const msg_update_attr_lsencap_t **attr_out);
595
596
597/* attributes */
598
600runtime_error_t parse_route(const void *buff, size_t len,
601 const route_t **route_out);
602
604runtime_error_t parse_itadpath(const void *buff, size_t len,
605 const itadpath_t **itadpath_out);
606
608runtime_error_t parse_attr_localpref(const void *buff, size_t len,
609 const attr_localpref_t **localpref_out);
610
612runtime_error_t parse_attr_multiexitdisc(const void *buff, size_t len,
613 const attr_multiexitdisc_t **multiexitdisc_out);
614
616runtime_error_t parse_community(const void *buff, size_t len,
617 const community_t **community_out);
618
620runtime_error_t parse_itad(const void *buff, size_t len,
621 const uint32_t **itad_out);
622
623
624
625/* message KEEPALIVE
626 * (empty, no parser)
627 */
628
629
630/* message NOTIFICATION
631 */
632
634runtime_error_t parse_msg_notif(const void *buff, size_t len,
635 const msg_notif_t **notif_out);
636
638const char *notif_code_subcode_str(int code, int subcode);
639
640
641#endif /* _PROTOCOL_H */
642
const char * notif_code_strs[]
NOTIFICATION error code strings.
Definition protocol.c:75
const char * runtime_error_strs[]
Serialization/deserialization runtime error strings.
Definition protocol.c:139
const char * notif_subcode_update_strs[]
NOTIFICATION error subcode for UPDATE strings.
Definition protocol.c:102
const size_t supported_routetypes_size
Supported routetypes constant size.
Definition protocol.c:178
const char * notif_subcode_open_strs[]
NOTIFICATION error subcode for OPEN strings.
Definition protocol.c:91
const char ** notif_code_subcodes_strs[]
subcode strings per code class
Definition protocol.c:112
const char * af_strs[]
Address family strings.
Definition protocol.c:65
const capinfo_routetype_t supported_routetypes[]
Supported routetypes constant.
Definition protocol.c:164
const char * notif_subcode_msg_strs[]
NOTIFICATION error subcode for message strings.
Definition protocol.c:85
const char * capinfo_transmode_strs[]
Capability information transmission mode types strings.
Definition protocol.c:58
const char * open_opt_type_strs[]
Message type strings.
Definition protocol.c:45
const char * msg_type_strs[]
Message type strings.
Definition protocol.c:37
const char * capinfo_code_strs[]
Capability information option type strings.
Definition protocol.c:51
uint32_t attr_itadtopology_t[]
Attribute ITAD Topology.
Definition protocol.h:342
runtime_error_t new_attr_reachableroutes(void *buff, size_t len, int lsencap, uint32_t id, uint32_t seq, const route_t **routes, size_t routes_size)
Serialize ReachableRoutes attribute.
Definition protocol.c:388
af
Address families.
Definition protocol.h:203
app_proto
Application protocols.
Definition protocol.h:217
@ APP_PROTO_H323_225_0_RAS
Definition protocol.h:221
@ APP_PROTO_H323_225_0_ANNEXG
Definition protocol.h:222
@ APP_PROTO_H323_225_0_Q931
Definition protocol.h:220
@ APP_PROTO_SIP
Definition protocol.h:219
@ APP_PROTO_IAX2
Definition protocol.h:224
capinfo_transmode
Capability information transmission mode types.
Definition protocol.h:109
runtime_error_t parse_msg_update_attr_lsencap(const void *buff, size_t len, const msg_update_attr_lsencap_t **attr_out)
Deserialize UPDATE link-state encapsulated attribute.
Definition protocol.c:855
runtime_error_t new_attr_localpref(void *buff, size_t len, uint32_t localpref)
Serialize LocalPref attribute.
Definition protocol.c:528
runtime_error_t parse_attr_localpref(const void *buff, size_t len, const attr_localpref_t **localpref_out)
Deserialize LocalPreference attribute.
Definition protocol.c:929
runtime_error_t new_msg_notif(void *buff, size_t len, uint8_t error_code, uint8_t error_subcode, size_t datalen, const void *data)
Serialize NOTIFICATION message.
Definition protocol.c:651
itadpath_type
ITAD path types.
Definition protocol.h:271
runtime_error_t parse_itadpath(const void *buff, size_t len, const itadpath_t **itadpath_out)
Deserialize ITAD path.
Definition protocol.c:903
enum runtime_errors_e runtime_error_t
Serialization/deserialization runtime errors.
notif_code
NOTIFICATION error code.
Definition protocol.h:364
runtime_error_t new_attr_nexthopserver(void *buff, size_t len, uint32_t next_itad, const char *server)
Serialize NextHopServer attribute.
Definition protocol.c:432
runtime_error_t new_attr_multiexitdisc(void *buff, size_t len, uint32_t metric)
Serialize MultiExitDisc attribute.
Definition protocol.c:546
void attr_convertedroute_t
Attribute ConvertedRoute.
Definition protocol.h:350
uint32_t capinfo_transmode_t
Capability information transmission mode.
Definition protocol.h:124
notif_subcode_update
NOTIFICATION error subcode for UPDATE.
Definition protocol.h:400
msg_type
Message types.
Definition protocol.h:36
runtime_error_t parse_msg_open_opt(const void *buff, size_t len, const msg_open_opt_t **opt_out)
Deserialize message OPEN optional parameter.
Definition protocol.c:733
void msg_keepalive_t
Message KEEPALIVE.
Definition protocol.h:360
notif_subcode_open
NOTIFICATION error subcode for OPEN.
Definition protocol.h:386
runtime_error_t parse_msg_open(const void *buff, size_t len, const msg_open_t **open_out)
Deserialize message OPEN.
Definition protocol.c:710
uint32_t attr_multiexitdisc_t
Attribute MultiExitDiscriminator.
Definition protocol.h:317
itadpath_t attr_routedpath_t
Attribute RoutedPath.
Definition protocol.h:298
runtime_errors_e
Serialization/deserialization runtime errors.
Definition protocol.h:426
@ ERROR_ITAD
Definition protocol.h:431
@ ERROR_NOTIF_ERROR_SUBCODE
Definition protocol.h:433
@ ERROR_OPT
Definition protocol.h:438
@ ERROR_CAPINFO_CODE
Definition protocol.h:439
@ ERROR_INCOMPLETE
Definition protocol.h:435
@ ERROR_BUFF
Definition protocol.h:428
@ ERROR_NOTIF_ERROR_CODE
Definition protocol.h:432
@ ERROR_APP_PROTO
Definition protocol.h:441
@ ERROR_MSGTYPE
Definition protocol.h:436
@ ERROR_ATTR_TYPE
Definition protocol.h:443
@ ERROR_HOLD
Definition protocol.h:430
@ ERROR_COMMUNITY_ITAD
Definition protocol.h:447
@ ERROR_AF
Definition protocol.h:440
@ ERROR_TRANS
Definition protocol.h:442
@ ERROR_BUFFLEN
Definition protocol.h:429
@ ERROR_ITADPATH_TYPE
Definition protocol.h:446
@ ERROR_VERSION
Definition protocol.h:437
@ ERROR_ATTR_FLAG_LSENCAP
Definition protocol.h:445
@ ERROR_ATTR_FLAG_WELL_KNOWN
Definition protocol.h:444
notif_subcode_msg
NOTIFICATION error subcode for message.
Definition protocol.h:377
runtime_error_t new_attr_communities(void *buff, size_t len, const community_t *communities, size_t communities_size)
Serialize Communities attribute.
Definition protocol.c:565
open_opt_type
Message OPEN optional parameter types.
Definition protocol.h:55
runtime_error_t parse_capinfo_transmode(const void *buff, size_t len, const capinfo_transmode_t **transmode_out)
Deserialize option transmission mode.
Definition protocol.c:797
runtime_error_t parse_capinfo(const void *buff, size_t len, const capinfo_t **capinfo_out)
Deserialize option capability information.
Definition protocol.c:750
runtime_error_t parse_msg_update_attr(const void *buff, size_t len, const msg_update_attr_t **attr_out)
Deserialize UPDATE attribute.
Definition protocol.c:823
uint32_t attr_localpref_t
Attribute LocalPreference.
Definition protocol.h:310
runtime_error_t parse_msg_notif(const void *buff, size_t len, const msg_notif_t **notif_out)
Deserialize NOTIFICATION message.
Definition protocol.c:1021
runtime_error_t parse_itad(const void *buff, size_t len, const uint32_t **itad_out)
Deserialize ITAD.
Definition protocol.c:988
const char * app_proto_str(int app_proto)
Application protocol to string.
Definition protocol.c:122
runtime_error_t new_attr_routedpath(void *buff, size_t len, const itadpath_t *path)
Serialize RoutedPath attribute.
Definition protocol.c:488
const char * notif_code_subcode_str(int code, int subcode)
String NOTIFICATION code, subcode.
Definition protocol.c:1041
runtime_error_t new_msg_update(void *buff, size_t len, const msg_update_attr_t **attrs, size_t attrs_size)
Serialize UPDATE message.
Definition protocol.c:315
runtime_error_t parse_route(const void *buff, size_t len, const route_t **route_out)
Deserialize route.
Definition protocol.c:879
attr_type
UPDATE attribute types.
Definition protocol.h:154
@ ATTR_TYPE_WITHDRAWNROUTES
Definition protocol.h:156
@ ATTR_TYPE_RESOURCEPRIORITY
Definition protocol.h:168
@ ATTR_TYPE_TOTALCIRCUITCAPACITY
Definition protocol.h:170
runtime_error_t new_msg_keepalive(void *buff, size_t len)
Serialize KEEPALIVE message.
Definition protocol.c:632
runtime_error_t new_attr_advertisementpath(void *buff, size_t len, const itadpath_t *path)
Serialize AdvertisementPath attribute.
Definition protocol.c:464
runtime_error_t new_msg_open(void *buff, size_t len, uint16_t hold, uint32_t itad, uint32_t id, const capinfo_routetype_t *capinfo_routetypes, size_t routetypes_size, capinfo_transmode_t capinfo_transmode)
Serialize OPEN message.
Definition protocol.c:234
itadpath_t attr_advertisementpath_t
Attribute AdvertisementPath.
Definition protocol.h:289
struct __attribute__((packed))
Message header.
Definition protocol.h:47
runtime_error_t parse_attr_multiexitdisc(const void *buff, size_t len, const attr_multiexitdisc_t **multiexitdisc_out)
Deserialize MultiExitDisc attribute.
Definition protocol.c:945
route_t attr_reachableroutes_t[]
Attribute ReachableRoutes.
Definition protocol.h:252
community_t attr_communities_t[]
Attribute Communities.
Definition protocol.h:334
capinfo_code
Capability information option types.
Definition protocol.h:85
runtime_error_t new_attr_atomicaggregate(void *buff, size_t len)
Serialize AtomicAggregate attribute.
Definition protocol.c:511
runtime_error_t parse_capinfo_routetype(const void *buff, size_t len, const capinfo_routetype_t **routetype_out)
Deserialize option route type.
Definition protocol.c:770
runtime_error_t parse_msg(const void *buff, size_t len, const msg_t **msg_out)
Deserialize message.
Definition protocol.c:690
route_t attr_withdrawnroutes_t[]
Attribute WithdrawnRoutes.
Definition protocol.h:244
runtime_error_t parse_community(const void *buff, size_t len, const community_t **community_out)
Deserialize Community.
Definition protocol.c:963
runtime_error_t new_attr_itadtopology(void *buff, size_t len, uint32_t id, uint32_t seq, const uint32_t *itads, size_t itads_size)
Serialize ITAD Topology attribute.
Definition protocol.c:588
runtime_error_t new_attr_withdrawnroutes(void *buff, size_t len, int lsencap, uint32_t id, uint32_t seq, const route_t **routes, size_t routes_size)
Serialize WithdrawnRoutes attribute.
Definition protocol.c:346
runtime_error_t new_attr_convertedroute(void *buff, size_t len)
Serialize ConvertedRoute attribute.
Definition protocol.c:613
void attr_atomicaggregate_t
Attribute AtomicAggregate.
Definition protocol.h:306