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#define INITIAL_SEQUENCE_NUMBER 0x80000001 /* -N + 1 */
199#define MAX_SEQUENCE_NUMBER 0x7fffffff /* N - 1*/
200
201
202/* attributes */
203
204
206enum af {
207 /* RFC3219 */
208 AF_DECIMAL = 1,
209 AF_PENTADECIMAL,
210 AF_E164,
211 /* RFC5140 */
212 AF_TRUNKGROUP,
213 AF_CARRIER
214};
215
217extern const char *af_strs[];
218
230
232const char *app_proto_str(int app_proto);
233
235typedef struct __attribute__((packed)) {
236 uint16_t route_af;
237 uint16_t route_app_proto;
238 uint16_t route_len;
239 char route_addr[];
240} route_t;
241
247typedef route_t attr_withdrawnroutes_t[];
248
249
255typedef route_t attr_reachableroutes_t[];
256
257
265
266typedef struct __attribute__((packed)) {
267 uint32_t nexthopserver_itad;
268 uint16_t nexthopserver_serverlen;
269 char nexthopserver_server[];
270} attr_nexthopserver_t;
271
272
275 ITADPATH_TYPE_AP_SET = 1,
276 ITADPATH_TYPE_AP_SEQUENCE
277};
278
280typedef struct __attribute__((packed)) {
281 uint8_t itadpath_type;
282 uint8_t itadpath_len;
283 uint32_t itadpath_segs[];
284} itadpath_t;
285
292typedef itadpath_t attr_advertisementpath_t;
293
294
301typedef itadpath_t attr_routedpath_t;
302
303
310
311
313typedef uint32_t attr_localpref_t;
314
315
320typedef uint32_t attr_multiexitdisc_t;
321
322
324typedef struct __attribute__((packed)) {
325 uint32_t community_itad;
326 uint32_t community_id;
327} community_t;
328
330#define COMMUNITY_NO_EXPORT ((community_t){ 0x00000000, 0xffffff01 })
331
337typedef community_t attr_communities_t[];
338
339
345typedef uint32_t attr_itadtopology_t[];
346
347
354
355
356/* future RFC5115 and RFC5140 attributes go here */
357
358
363typedef void msg_keepalive_t;
364
365
368 NOTIF_CODE_ERROR_MSG = 1,
369 NOTIF_CODE_ERROR_OPEN,
370 NOTIF_CODE_ERROR_UPDATE,
371 NOTIF_CODE_ERROR_EXPIRED,
372 NOTIF_CODE_ERROR_STATE,
373 NOTIF_CODE_CEASE
374};
375
377extern const char *notif_code_strs[];
378
381 NOTIF_SUBCODE_MSG_BAD_LEN = 1,
382 NOTIF_SUBCODE_MSG_BAD_TYPE
383};
384
386extern const char *notif_subcode_msg_strs[];
387
390 NOTIF_SUBCODE_OPEN_UNSUP_VERSION = 1,
391 NOTIF_SUBCODE_OPEN_BAD_ITAD,
392 NOTIF_SUBCODE_OPEN_BAD_ID,
393 NOTIF_SUBCODE_OPEN_UNSUP_OPT,
394 NOTIF_SUBCODE_OPEN_BAD_HOLD,
395 NOTIF_SUBCODE_OPEN_UNSUP_CAP,
396 NOTIF_SUBCODE_OPEN_CAP_MISMATCH
397};
398
400extern const char *notif_subcode_open_strs[];
401
404 NOTIF_SUBCODE_UPDATE_MALFORM_ATTR = 1,
405 NOTIF_SUBCODE_UPDATE_UNK_WELLKNOWN_ATTR,
406 NOTIF_SUBCODE_UPDATE_MISS_WELLKNOWN_ATTR,
407 NOTIF_SUBCODE_UPDATE_BAD_ATTR_FLAG,
408 NOTIF_SUBCODE_UPDATE_BAD_ATTR_LEN,
409 NOTIF_SUBCODE_UPDATE_INVAL_ATTR
410};
411
413extern const char *notif_subcode_update_strs[];
414
416extern const char **notif_code_subcodes_strs[];
417
419typedef struct __attribute__((packed)) {
420 uint8_t notif_error_code;
421 uint8_t notif_error_subcode;
422 uint8_t notif_data[];
423} msg_notif_t;
424
425
426/* serialization/deserialization functions */
427
452
454extern const char *runtime_error_strs[];
455
456
457/* default timers */
458
459#define TIMER_CONNECT_RETRY 120
460#define TIMER_HOLD_TIME 90
461#define TIMER_KEEPALIVE 30
462#define TIMER_MAX_PURGE_TIME 10
463#define TIMER_DISABLE_TIME 180
464#define TIMER_MIN_ITAD_ORIG_INT 30
465#define TIMER_MIN_ROUTE_ADVERT_INT 30
466
467
468/* default attribute values (when not present) */
469
470#define DEF_LOCAL_PREF 100
471#define DEF_METRIC 100
472
473
474/* objects */
475
477extern const capinfo_routetype_t supported_routetypes[];
479extern const size_t supported_routetypes_size;
480
481
482/* macros */
483
485#define PROTO_TCP_PORT 6069
486
488#define PROTO_TRY(o, res, a) \
489 res = o; \
490 if (res < 0) { \
491 ERROR("protocol error: %s", runtime_error_strs[-res]); \
492 a; \
493 }
494
495
496/* message serializers
497 * sizes are in element count, not bytes
498 */
499
501runtime_error_t new_msg_open(void *buff, size_t len, uint16_t hold,
502 uint32_t itad, uint32_t id, const capinfo_routetype_t *capinfo_routetypes,
503 size_t routetypes_size, capinfo_transmode_t capinfo_transmode);
504
506runtime_error_t new_msg_update(void *buff, size_t len,
507 const msg_update_attr_t **attrs, size_t attrs_size);
508
510runtime_error_t new_msg_keepalive(void *buff, size_t len);
511
513runtime_error_t new_msg_notif(void *buff, size_t len, uint8_t error_code,
514 uint8_t error_subcode, size_t datalen, const void *data);
515
516
517/* UPDATE attribute serializers */
518
521runtime_error_t new_attr_withdrawnroutes(void *buff, size_t len, int lsencap,
522 uint32_t id, uint32_t seq, const void *routes, size_t routes_size);
523
526runtime_error_t new_attr_reachableroutes(void *buff, size_t len, int lsencap,
527 uint32_t id, uint32_t seq, const void *routes, size_t routes_size);
528
530runtime_error_t new_attr_nexthopserver(void *buff, size_t len,
531 uint32_t next_itad, const char *server);
532
534runtime_error_t new_attr_advertisementpath(void *buff, size_t len,
535 const itadpath_t *path);
536
538runtime_error_t new_attr_routedpath(void *buff, size_t len,
539 const itadpath_t *path);
540
542runtime_error_t new_attr_atomicaggregate(void *buff, size_t len);
543
545runtime_error_t new_attr_localpref(void *buff, size_t len, uint32_t localpref);
546
548runtime_error_t new_attr_multiexitdisc(void *buff, size_t len, uint32_t metric);
549
551runtime_error_t new_attr_communities(void *buff, size_t len,
552 const community_t *communities, size_t communities_size);
553
555runtime_error_t new_attr_itadtopology(void *buff, size_t len, uint32_t id,
556 uint32_t seq, const uint32_t *itads, size_t itads_size);
557
559runtime_error_t new_attr_convertedroute(void *buff, size_t len);
560
561
562/* deserializers */
563
564/* messages */
565
567runtime_error_t parse_msg(const void *buff, size_t len, const msg_t **msg_out);
568
569
570/* message OPEN
571 */
572
574runtime_error_t parse_msg_open(const void *buff, size_t len,
575 const msg_open_t **open_out);
576
578runtime_error_t parse_msg_open_opt(const void *buff, size_t len,
579 const msg_open_opt_t **opt_out);
580
582runtime_error_t parse_capinfo(const void *buff, size_t len,
583 const capinfo_t **capinfo_out);
584
586runtime_error_t parse_capinfo_routetype(const void *buff, size_t len,
587 const capinfo_routetype_t **routetype_out);
588
590runtime_error_t parse_capinfo_transmode(const void *buff, size_t len,
591 const capinfo_transmode_t **transmode_out);
592
593
594/* message UPDATE
595 * list of attributes
596 */
597
599runtime_error_t parse_msg_update_attr(const void *buff, size_t len,
600 const msg_update_attr_t **attr_out);
601
603runtime_error_t parse_msg_update_attr_lsencap(const void *buff, size_t len,
604 const msg_update_attr_lsencap_t **attr_out);
605
606
607/* attributes */
608
610runtime_error_t parse_route(const void *buff, size_t len,
611 const route_t **route_out);
612
614runtime_error_t parse_itadpath(const void *buff, size_t len,
615 const itadpath_t **itadpath_out);
616
618runtime_error_t parse_attr_localpref(const void *buff, size_t len,
619 const attr_localpref_t **localpref_out);
620
622runtime_error_t parse_attr_multiexitdisc(const void *buff, size_t len,
623 const attr_multiexitdisc_t **multiexitdisc_out);
624
626runtime_error_t parse_community(const void *buff, size_t len,
627 const community_t **community_out);
628
630runtime_error_t parse_itad(const void *buff, size_t len,
631 const uint32_t **itad_out);
632
633
634
635/* message KEEPALIVE
636 * (empty, no parser)
637 */
638
639
640/* message NOTIFICATION
641 */
642
644runtime_error_t parse_msg_notif(const void *buff, size_t len,
645 const msg_notif_t **notif_out);
646
648const char *notif_code_subcode_str(int code, int subcode);
649
650
651#endif /* _PROTOCOL_H */
652
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:142
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:181
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:167
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:345
runtime_error_t new_attr_withdrawnroutes(void *buff, size_t len, int lsencap, uint32_t id, uint32_t seq, const void *routes, size_t routes_size)
Serialize WithdrawnRoutes attribute routes_size is size of routes in bytes.
Definition protocol.c:350
af
Address families.
Definition protocol.h:206
app_proto
Application protocols.
Definition protocol.h:220
@ APP_PROTO_H323_225_0_RAS
Definition protocol.h:224
@ APP_PROTO_H323_225_0_ANNEXG
Definition protocol.h:225
@ APP_PROTO_H323_225_0_Q931
Definition protocol.h:223
@ APP_PROTO_SIP
Definition protocol.h:222
@ APP_PROTO_IAX2
Definition protocol.h:227
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:853
runtime_error_t new_attr_localpref(void *buff, size_t len, uint32_t localpref)
Serialize LocalPref attribute.
Definition protocol.c:526
runtime_error_t parse_attr_localpref(const void *buff, size_t len, const attr_localpref_t **localpref_out)
Deserialize LocalPreference attribute.
Definition protocol.c:927
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:649
itadpath_type
ITAD path types.
Definition protocol.h:274
runtime_error_t parse_itadpath(const void *buff, size_t len, const itadpath_t **itadpath_out)
Deserialize ITAD path.
Definition protocol.c:901
enum runtime_errors_e runtime_error_t
Serialization/deserialization runtime errors.
runtime_error_t new_attr_reachableroutes(void *buff, size_t len, int lsencap, uint32_t id, uint32_t seq, const void *routes, size_t routes_size)
Serialize ReachableRoutes attribute routes_size is size of routes in bytes.
Definition protocol.c:390
notif_code
NOTIFICATION error code.
Definition protocol.h:367
runtime_error_t new_attr_nexthopserver(void *buff, size_t len, uint32_t next_itad, const char *server)
Serialize NextHopServer attribute.
Definition protocol.c:429
runtime_error_t new_attr_multiexitdisc(void *buff, size_t len, uint32_t metric)
Serialize MultiExitDisc attribute.
Definition protocol.c:544
void attr_convertedroute_t
Attribute ConvertedRoute.
Definition protocol.h:353
uint32_t capinfo_transmode_t
Capability information transmission mode.
Definition protocol.h:124
notif_subcode_update
NOTIFICATION error subcode for UPDATE.
Definition protocol.h:403
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:731
void msg_keepalive_t
Message KEEPALIVE.
Definition protocol.h:363
notif_subcode_open
NOTIFICATION error subcode for OPEN.
Definition protocol.h:389
runtime_error_t parse_msg_open(const void *buff, size_t len, const msg_open_t **open_out)
Deserialize message OPEN.
Definition protocol.c:708
uint32_t attr_multiexitdisc_t
Attribute MultiExitDiscriminator.
Definition protocol.h:320
itadpath_t attr_routedpath_t
Attribute RoutedPath.
Definition protocol.h:301
runtime_errors_e
Serialization/deserialization runtime errors.
Definition protocol.h:429
@ ERROR_ITAD
Definition protocol.h:434
@ ERROR_NOTIF_ERROR_SUBCODE
Definition protocol.h:436
@ ERROR_OPT
Definition protocol.h:441
@ ERROR_CAPINFO_CODE
Definition protocol.h:442
@ ERROR_INCOMPLETE
Definition protocol.h:438
@ ERROR_BUFF
Definition protocol.h:431
@ ERROR_NOTIF_ERROR_CODE
Definition protocol.h:435
@ ERROR_APP_PROTO
Definition protocol.h:444
@ ERROR_MSGTYPE
Definition protocol.h:439
@ ERROR_ATTR_TYPE
Definition protocol.h:446
@ ERROR_HOLD
Definition protocol.h:433
@ ERROR_COMMUNITY_ITAD
Definition protocol.h:450
@ ERROR_AF
Definition protocol.h:443
@ ERROR_TRANS
Definition protocol.h:445
@ ERROR_BUFFLEN
Definition protocol.h:432
@ ERROR_ITADPATH_TYPE
Definition protocol.h:449
@ ERROR_VERSION
Definition protocol.h:440
@ ERROR_ATTR_FLAG_LSENCAP
Definition protocol.h:448
@ ERROR_ATTR_FLAG_WELL_KNOWN
Definition protocol.h:447
notif_subcode_msg
NOTIFICATION error subcode for message.
Definition protocol.h:380
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:563
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:795
runtime_error_t parse_capinfo(const void *buff, size_t len, const capinfo_t **capinfo_out)
Deserialize option capability information.
Definition protocol.c:748
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:821
uint32_t attr_localpref_t
Attribute LocalPreference.
Definition protocol.h:313
runtime_error_t parse_msg_notif(const void *buff, size_t len, const msg_notif_t **notif_out)
Deserialize NOTIFICATION message.
Definition protocol.c:1019
runtime_error_t parse_itad(const void *buff, size_t len, const uint32_t **itad_out)
Deserialize ITAD.
Definition protocol.c:986
const char * app_proto_str(int app_proto)
Application protocol to string.
Definition protocol.c:125
runtime_error_t new_attr_routedpath(void *buff, size_t len, const itadpath_t *path)
Serialize RoutedPath attribute.
Definition protocol.c:486
const char * notif_code_subcode_str(int code, int subcode)
String NOTIFICATION code, subcode.
Definition protocol.c:1039
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:318
runtime_error_t parse_route(const void *buff, size_t len, const route_t **route_out)
Deserialize route.
Definition protocol.c:877
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:630
runtime_error_t new_attr_advertisementpath(void *buff, size_t len, const itadpath_t *path)
Serialize AdvertisementPath attribute.
Definition protocol.c:462
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:237
itadpath_t attr_advertisementpath_t
Attribute AdvertisementPath.
Definition protocol.h:292
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:943
route_t attr_reachableroutes_t[]
Attribute ReachableRoutes.
Definition protocol.h:255
community_t attr_communities_t[]
Attribute Communities.
Definition protocol.h:337
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:509
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:768
runtime_error_t parse_msg(const void *buff, size_t len, const msg_t **msg_out)
Deserialize message.
Definition protocol.c:688
route_t attr_withdrawnroutes_t[]
Attribute WithdrawnRoutes.
Definition protocol.h:247
runtime_error_t parse_community(const void *buff, size_t len, const community_t **community_out)
Deserialize Community.
Definition protocol.c:961
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:586
runtime_error_t new_attr_convertedroute(void *buff, size_t len)
Serialize ConvertedRoute attribute.
Definition protocol.c:611
void attr_atomicaggregate_t
Attribute AtomicAggregate.
Definition protocol.h:309