Symbol: aspath
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
27
static struct aspath *build_aspath(const uint32_t *, uint32_t, int);
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
442
struct aspath *a;
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
445
a = build_aspath(aspath_testset[i].aspath,
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
450
print_aspath(aspath_testset[i].aspath,
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
458
print_aspath(aspath_testset[i].aspath,
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
46
const uint32_t *aspath;
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
467
a = build_aspath(aspath_testset[i].aspath,
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
472
print_aspath(aspath_testset[i].aspath,
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
481
print_aspath(aspath_testset[i].aspath,
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
494
struct aspath *a;
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
498
a = build_aspath(aspa_testset[i].aspath,
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
507
print_aspath(aspa_testset[i].aspath,
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
52
const uint32_t *aspath;
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
555
static struct aspath *
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
558
struct aspath *aspath;
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
570
aspath = malloc(ASPATH_HEADER_SIZE + len);
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
571
if (aspath == NULL)
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
574
aspath->len = len;
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
575
aspath->ascnt = asncnt; /* lie but nothing cares */
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
576
aspath->source_as = 0;
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
579
return aspath;
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
582
aspath->source_as = asns[asncnt - 1];
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
584
aspath->source_as = asns[0];
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
586
aspath->data[0] = AS_SEQUENCE;
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
587
aspath->data[1] = asncnt;
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
594
memcpy(aspath->data + 2 + sizeof(as) * i, &as,
regress/usr.sbin/bgpd/unittests/rde_aspa_test.c
598
return aspath;
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
106
.p = { .re = &dummy_re, .aspath = &asp[0], .peer = &peer1, .nhflags = NEXTHOP_VALID, .lastchange = T1, } },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
109
.p = { .re = &dummy_re, .aspath = &asp[1], .peer = &peer1, .nhflags = NEXTHOP_VALID, .lastchange = T1, } },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
112
.p = { .re = &dummy_re, .aspath = &asp[2], .peer = &peer1, .nhflags = NEXTHOP_VALID, .lastchange = T1, } },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
115
.p = { .re = &dummy_re, .aspath = &asp[0], .peer = &peer1, .nhflags = 0, .lastchange = T1, } },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
118
.p = { .re = &dummy_re, .aspath = &asp[3], .peer = &peer1, .nhflags = NEXTHOP_VALID, .lastchange = T1, } },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
121
.p = { .re = &dummy_re, .aspath = &asp[4], .peer = &peer1, .nhflags = NEXTHOP_VALID, .lastchange = T1, } },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
124
.p = { .re = &dummy_re, .aspath = &asp[5], .peer = &peer1, .nhflags = NEXTHOP_VALID, .lastchange = T1, } },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
126
.p = { .re = &dummy_re, .aspath = &asp[6], .peer = &peer1, .nhflags = NEXTHOP_VALID, .lastchange = T1, } },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
129
.p = { .re = &dummy_re, .aspath = &asp[7], .peer = &peer1, .nhflags = NEXTHOP_VALID, .lastchange = T1, } },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
132
.p = { .re = &dummy_re, .aspath = &asp[0], .peer = &peer1_i, .nhflags = NEXTHOP_VALID, .lastchange = T1, } },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
135
.p = { .re = &dummy_re, .aspath = &asp[8], .peer = &peer1, .nhflags = NEXTHOP_VALID, .lastchange = T1, } },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
139
.p = { .re = &dummy_re, .aspath = &asp[0], .peer = &peer1, .nhflags = NEXTHOP_VALID, .lastchange = T2, } },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
142
.p = { .re = &dummy_re, .aspath = &asp[0], .peer = &peer2, .nhflags = NEXTHOP_VALID, .lastchange = T1, } },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
146
.p = { .re = &dummy_re, .aspath = &asp[0], .peer = &peer1_a4, .nhflags = NEXTHOP_VALID, .lastchange = T1, } },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
150
{ .aspath = &asdata[0].a, .med = 100, .lpref = 100, .origin = ORIGIN_EGP },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
151
{ .aspath = &asdata[0].a, .med = 150, .lpref = 100, .origin = ORIGIN_EGP },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
152
{ .aspath = &asdata[2].a, .med = 75, .lpref = 100, .origin = ORIGIN_EGP },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
153
{ .aspath = &asdata[2].a, .med = 125, .lpref = 100, .origin = ORIGIN_EGP },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
154
{ .aspath = &asdata[1].a, .med = 110, .lpref = 100, .origin = ORIGIN_EGP },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
155
{ .aspath = &asdata[1].a, .med = 90, .lpref = 100, .origin = ORIGIN_EGP },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
166
{ .re = &dummy_re, .aspath = &med_asp[0], .peer = &peer2, .nhflags = NEXTHOP_VALID, .lastchange = T1, };
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
168
{ .re = &dummy_re, .aspath = &med_asp[1], .peer = &peer1, .nhflags = NEXTHOP_VALID, .lastchange = T1, };
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
170
{ .re = &dummy_re, .aspath = &med_asp[2], .peer = &peer3, .nhflags = NEXTHOP_VALID, .lastchange = T1, };
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
172
{ .re = &dummy_re, .aspath = &med_asp[3], .peer = &peer1_a4, .nhflags = NEXTHOP_VALID, .lastchange = T1, };
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
175
{ .re = &dummy_re, .aspath = &med_asp[5], .peer = &peer3, .nhflags = NEXTHOP_VALID, .lastchange = T1, };
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
177
{ .re = &dummy_re, .aspath = &med_asp[4], .peer = &peer1, .nhflags = NEXTHOP_VALID, .lastchange = T1, };
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
184
{ .re = &dummy_re, .aspath = &asp[0], .peer = &peer2, .nhflags = NEXTHOP_VALID, .lastchange = T1, };
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
186
{ .re = &dummy_re, .aspath = &asp[0], .peer = &peer1, .nhflags = NEXTHOP_VALID, .lastchange = T2, };
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
66
struct aspath a;
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
81
{ .aspath = &asdata[0].a, .med = 100, .lpref = 100, .origin = ORIGIN_IGP, .weight = 1000 },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
83
{ .aspath = &asdata[0].a, .med = 100, .lpref = 100, .origin = ORIGIN_IGP, .flags=F_ATTR_PARSE_ERR },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
84
{ .aspath = &asdata[0].a, .med = 100, .lpref = 100, .origin = ORIGIN_IGP, .flags=F_ATTR_LOOP },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
86
{ .aspath = &asdata[0].a, .med = 100, .lpref = 50, .origin = ORIGIN_IGP },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
88
{ .aspath = &asdata[1].a, .med = 100, .lpref = 100, .origin = ORIGIN_IGP },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
90
{ .aspath = &asdata[0].a, .med = 100, .lpref = 100, .origin = ORIGIN_EGP },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
91
{ .aspath = &asdata[0].a, .med = 100, .lpref = 100, .origin = ORIGIN_INCOMPLETE },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
93
{ .aspath = &asdata[0].a, .med = 200, .lpref = 100, .origin = ORIGIN_IGP },
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
95
{ .aspath = &asdata[0].a, .med = 100, .lpref = 100, .origin = ORIGIN_IGP, .weight = 100 },
usr.sbin/bgpctl/bgpctl.c
1282
!match_aspath(mre->aspath, mre->aspath_len, &req->as))
usr.sbin/bgpctl/bgpctl.c
1285
ibuf_from_buffer(&ibuf, mre->aspath, mre->aspath_len);
usr.sbin/bgpctl/bgpctl.c
1350
!match_aspath(mre->aspath, mre->aspath_len, &req->as))
usr.sbin/bgpctl/bgpctl.c
1365
imsg_add(msg, mre->aspath, mre->aspath_len) == -1)
usr.sbin/bgpctl/mrtparser.c
673
if ((re->aspath = malloc(alen)) == NULL)
usr.sbin/bgpctl/mrtparser.c
675
if (ibuf_get(&abuf, re->aspath, alen) == -1)
usr.sbin/bgpctl/mrtparser.c
678
re->aspath = mrt_aspath_inflate(&abuf,
usr.sbin/bgpctl/mrtparser.c
680
if (re->aspath == NULL)
usr.sbin/bgpctl/mrtparser.c
754
free(re->aspath);
usr.sbin/bgpctl/mrtparser.c
756
if ((re->aspath = malloc(alen)) == NULL)
usr.sbin/bgpctl/mrtparser.c
758
if (ibuf_get(&abuf, re->aspath, alen) == -1)
usr.sbin/bgpctl/mrtparser.c
803
free(r->entries[i].aspath);
usr.sbin/bgpctl/mrtparser.h
40
void *aspath;
usr.sbin/bgpctl/output.c
1005
if (aspath_asprint(&aspath, asbuf) == -1)
usr.sbin/bgpctl/output.c
1007
if (strlen(aspath) > 0)
usr.sbin/bgpctl/output.c
1008
printf("%s ", aspath);
usr.sbin/bgpctl/output.c
1009
free(aspath);
usr.sbin/bgpctl/output.c
1018
char *aspath, *s;
usr.sbin/bgpctl/output.c
1024
if (aspath_asprint(&aspath, asbuf) == -1)
usr.sbin/bgpctl/output.c
1026
if (strlen(aspath) > 0)
usr.sbin/bgpctl/output.c
1027
printf(" %s%c", aspath, EOL0(flag0));
usr.sbin/bgpctl/output.c
1028
free(aspath);
usr.sbin/bgpctl/output.c
1051
show_rib(struct ctl_show_rib *r, struct ibuf *aspath, struct parse_result *res)
usr.sbin/bgpctl/output.c
1054
show_rib_detail(r, aspath, res->flags);
usr.sbin/bgpctl/output.c
1056
show_rib_brief(r, aspath);
usr.sbin/bgpctl/output.c
777
char *aspath;
usr.sbin/bgpctl/output.c
830
if (aspath_asprint(&aspath, &asbuf) == -1)
usr.sbin/bgpctl/output.c
832
printf("%s", aspath);
usr.sbin/bgpctl/output.c
833
free(aspath);
usr.sbin/bgpctl/output.c
995
char *p, *aspath;
usr.sbin/bgpctl/output_json.c
593
char *aspath;
usr.sbin/bgpctl/output_json.c
655
if (aspath_asprint(&aspath, &asbuf) == -1)
usr.sbin/bgpctl/output_json.c
657
json_do_string("aspath", aspath);
usr.sbin/bgpctl/output_json.c
658
free(aspath);
usr.sbin/bgpctl/output_json.c
826
char *aspath;
usr.sbin/bgpctl/output_json.c
834
if (aspath_asprint(&aspath, asbuf) == -1)
usr.sbin/bgpctl/output_json.c
836
json_do_string("aspath", aspath);
usr.sbin/bgpctl/output_json.c
837
free(aspath);
usr.sbin/bgpd/mrt.c
235
plen = aspath_length(a->aspath);
usr.sbin/bgpd/mrt.c
236
pdata = aspath_dump(a->aspath);
usr.sbin/bgpd/mrt.c
338
pdata = aspath_prepend(a->aspath, rde_local_as(), 0, &plen);
usr.sbin/bgpd/rde.c
1036
asp = &state.aspath;
usr.sbin/bgpd/rde.c
1037
asp->aspath = aspath_get(NULL, 0);
usr.sbin/bgpd/rde.c
1530
if ((subtype = rde_attr_missing(&state.aspath, peer->conf.ebgp,
usr.sbin/bgpd/rde.c
1539
rde_as4byte_fixup(peer, &state.aspath);
usr.sbin/bgpd/rde.c
1542
if (state.aspath.flags & F_ATTR_ASPATH &&
usr.sbin/bgpd/rde.c
1544
fas = aspath_neighbor(state.aspath.aspath);
usr.sbin/bgpd/rde.c
1557
if (state.aspath.flags & F_ATTR_ASPATH &&
usr.sbin/bgpd/rde.c
1560
!aspath_loopfree(state.aspath.aspath, peer->conf.local_as))
usr.sbin/bgpd/rde.c
1561
state.aspath.flags |= F_ATTR_LOOP;
usr.sbin/bgpd/rde.c
1563
rde_reflector(peer, &state.aspath);
usr.sbin/bgpd/rde.c
1566
if (state.aspath.flags & F_ATTR_ASPATH && peer->conf.ebgp) {
usr.sbin/bgpd/rde.c
1567
aspa_validation(rde_aspa, state.aspath.aspath,
usr.sbin/bgpd/rde.c
1568
&state.aspath.aspa_state);
usr.sbin/bgpd/rde.c
1569
state.aspath.aspa_generation = rde_aspa_generation;
usr.sbin/bgpd/rde.c
1629
if ((state.aspath.flags & ~F_ATTR_MP_UNREACH) == 0 &&
usr.sbin/bgpd/rde.c
1715
if ((state.aspath.flags & ~F_ATTR_MP_UNREACH) == 0)
usr.sbin/bgpd/rde.c
1730
if ((state.aspath.flags & F_ATTR_OTC) == 0) {
usr.sbin/bgpd/rde.c
1737
if (attr_optadd(&state.aspath,
usr.sbin/bgpd/rde.c
1744
state.aspath.flags |= F_ATTR_OTC;
usr.sbin/bgpd/rde.c
1797
if ((state.aspath.flags & F_ATTR_OTC) == 0) {
usr.sbin/bgpd/rde.c
1804
if (attr_optadd(&state.aspath,
usr.sbin/bgpd/rde.c
1812
state.aspath.flags |= F_ATTR_OTC;
usr.sbin/bgpd/rde.c
1820
state.aspath.flags &= ~F_ATTR_OTC_LEAK;
usr.sbin/bgpd/rde.c
1992
aspath_origin(in->aspath.aspath));
usr.sbin/bgpd/rde.c
1993
aspa_state = rde_aspa_validity(peer, &in->aspath, prefix->aid);
usr.sbin/bgpd/rde.c
2011
if (in->aspath.flags & F_ATTR_PARSE_ERR)
usr.sbin/bgpd/rde.c
2081
struct rde_aspath *a = &state->aspath;
usr.sbin/bgpd/rde.c
2177
a->aspath = aspath_get(ibuf_data(&tmpbuf), ibuf_size(&tmpbuf));
usr.sbin/bgpd/rde.c
2511
if (attr_optadd(&state->aspath, flags, type, ibuf_data(buf),
usr.sbin/bgpd/rde.c
2832
fas = aspath_neighbor(asp->aspath);
usr.sbin/bgpd/rde.c
3000
aslen = aspath_length(asp->aspath);
usr.sbin/bgpd/rde.c
3006
imsg_add(wbuf, aspath_dump(asp->aspath), aslen) == -1)
usr.sbin/bgpd/rde.c
3048
asp = attrs->aspath;
usr.sbin/bgpd/rde.c
3079
aslen = aspath_length(asp->aspath);
usr.sbin/bgpd/rde.c
3085
imsg_add(wbuf, aspath_dump(asp->aspath), aslen) == -1)
usr.sbin/bgpd/rde.c
3158
!aspath_match(asp->aspath, &req->as, 0))
usr.sbin/bgpd/rde.c
3177
struct rde_aspath *asp = attrs->aspath;
usr.sbin/bgpd/rde.c
3188
!aspath_match(asp->aspath, &req->as, 0))
usr.sbin/bgpd/rde.c
4390
&prefix, pt->prefixlen, aspath_origin(asp->aspath));
usr.sbin/bgpd/rde.c
4398
aspa_validation(rde_aspa, asp->aspath,
usr.sbin/bgpd/rde.c
4707
aspath_origin(state->aspath.aspath));
usr.sbin/bgpd/rde.c
570
asp = &netconf_state.aspath;
usr.sbin/bgpd/rde.c
571
asp->aspath = aspath_get(NULL, 0);
usr.sbin/bgpd/rde.c
588
asp = &netconf_state.aspath;
usr.sbin/bgpd/rde.c
595
aspath_put(asp->aspath);
usr.sbin/bgpd/rde.c
596
asp->aspath = aspath_get(ibuf_data(&ibuf),
usr.sbin/bgpd/rde.c
688
asp = &netconf_state.aspath;
usr.sbin/bgpd/rde.c
689
asp->aspath = aspath_get(NULL, 0);
usr.sbin/bgpd/rde.c
988
asp = &state.aspath;
usr.sbin/bgpd/rde.c
989
asp->aspath = aspath_get(NULL, 0);
usr.sbin/bgpd/rde.h
133
#define ASPATH_HEADER_SIZE (offsetof(struct aspath, data))
usr.sbin/bgpd/rde.h
226
struct aspath *aspath;
usr.sbin/bgpd/rde.h
293
struct rde_aspath *aspath;
usr.sbin/bgpd/rde.h
326
struct rde_aspath *aspath;
usr.sbin/bgpd/rde.h
353
struct rde_aspath aspath;
usr.sbin/bgpd/rde.h
465
struct aspath *aspath_get(void *, uint16_t);
usr.sbin/bgpd/rde.h
466
struct aspath *aspath_copy(struct aspath *);
usr.sbin/bgpd/rde.h
467
void aspath_put(struct aspath *);
usr.sbin/bgpd/rde.h
470
uint32_t aspath_neighbor(struct aspath *);
usr.sbin/bgpd/rde.h
471
int aspath_loopfree(struct aspath *, uint32_t);
usr.sbin/bgpd/rde.h
472
int aspath_compare(const struct aspath *, const struct aspath *);
usr.sbin/bgpd/rde.h
473
int aspath_match(struct aspath *, struct filter_as *, uint32_t);
usr.sbin/bgpd/rde.h
474
u_char *aspath_prepend(struct aspath *, uint32_t, int, uint16_t *);
usr.sbin/bgpd/rde.h
475
u_char *aspath_override(struct aspath *, uint32_t, uint32_t,
usr.sbin/bgpd/rde.h
477
int aspath_lenmatch(struct aspath *, enum aslen_spec, u_int);
usr.sbin/bgpd/rde.h
480
aspath_dump(struct aspath *aspath)
usr.sbin/bgpd/rde.h
482
return (aspath->data);
usr.sbin/bgpd/rde.h
486
aspath_length(struct aspath *aspath)
usr.sbin/bgpd/rde.h
488
return (aspath->len);
usr.sbin/bgpd/rde.h
492
aspath_origin(struct aspath *aspath)
usr.sbin/bgpd/rde.h
494
return (aspath->source_as);
usr.sbin/bgpd/rde.h
697
return (p->aspath);
usr.sbin/bgpd/rde.h
820
void aspa_validation(struct rde_aspa *, struct aspath *,
usr.sbin/bgpd/rde_adjout.c
282
h = ch_qhash64(attrkey, (uintptr_t)a->aspath);
usr.sbin/bgpd/rde_adjout.c
291
if (a->aspath == b->aspath &&
usr.sbin/bgpd/rde_adjout.c
321
a->aspath = path_ref(asp);
usr.sbin/bgpd/rde_adjout.c
346
path_unref(a->aspath);
usr.sbin/bgpd/rde_adjout.c
347
a->aspath = NULL;
usr.sbin/bgpd/rde_adjout.c
381
asp = path_getcache(&state->aspath);
usr.sbin/bgpd/rde_adjout.c
388
needle.aspath = asp;
usr.sbin/bgpd/rde_adjout.c
553
path_equal(&state->aspath, attrs->aspath)) {
usr.sbin/bgpd/rde_aspa.c
169
aspa_check_aspath(struct rde_aspa *ra, struct aspath *a, struct aspa_state *s)
usr.sbin/bgpd/rde_aspa.c
305
aspa_validation(struct rde_aspa *ra, struct aspath *a,
usr.sbin/bgpd/rde_attr.c
332
static uint16_t aspath_countlength(struct aspath *, uint16_t, int);
usr.sbin/bgpd/rde_attr.c
333
static void aspath_countcopy(struct aspath *, uint16_t, uint8_t *,
usr.sbin/bgpd/rde_attr.c
337
aspath_compare(const struct aspath *a1, const struct aspath *a2)
usr.sbin/bgpd/rde_attr.c
353
struct aspath *
usr.sbin/bgpd/rde_attr.c
356
struct aspath *aspath;
usr.sbin/bgpd/rde_attr.c
358
aspath = malloc(ASPATH_HEADER_SIZE + len);
usr.sbin/bgpd/rde_attr.c
359
if (aspath == NULL)
usr.sbin/bgpd/rde_attr.c
365
aspath->len = len;
usr.sbin/bgpd/rde_attr.c
366
aspath->ascnt = aspath_count(data, len);
usr.sbin/bgpd/rde_attr.c
367
aspath->source_as = aspath_extract_origin(data, len);
usr.sbin/bgpd/rde_attr.c
369
memcpy(aspath->data, data, len);
usr.sbin/bgpd/rde_attr.c
371
return (aspath);
usr.sbin/bgpd/rde_attr.c
374
struct aspath *
usr.sbin/bgpd/rde_attr.c
375
aspath_copy(struct aspath *a)
usr.sbin/bgpd/rde_attr.c
377
struct aspath *aspath;
usr.sbin/bgpd/rde_attr.c
379
aspath = malloc(ASPATH_HEADER_SIZE + a->len);
usr.sbin/bgpd/rde_attr.c
380
if (aspath == NULL)
usr.sbin/bgpd/rde_attr.c
386
memcpy(aspath, a, ASPATH_HEADER_SIZE + a->len);
usr.sbin/bgpd/rde_attr.c
388
return (aspath);
usr.sbin/bgpd/rde_attr.c
392
aspath_put(struct aspath *aspath)
usr.sbin/bgpd/rde_attr.c
394
if (aspath == NULL)
usr.sbin/bgpd/rde_attr.c
398
rdemem.aspath_size -= ASPATH_HEADER_SIZE + aspath->len;
usr.sbin/bgpd/rde_attr.c
399
free(aspath);
usr.sbin/bgpd/rde_attr.c
465
if (ascnt > a->aspath->ascnt) {
usr.sbin/bgpd/rde_attr.c
471
diff = a->aspath->ascnt - ascnt;
usr.sbin/bgpd/rde_attr.c
474
difflen = aspath_countlength(a->aspath, diff, hroom);
usr.sbin/bgpd/rde_attr.c
481
aspath_countcopy(a->aspath, diff, np, difflen, hroom);
usr.sbin/bgpd/rde_attr.c
490
aspath_put(a->aspath);
usr.sbin/bgpd/rde_attr.c
491
a->aspath = aspath_get(np, nlen);
usr.sbin/bgpd/rde_attr.c
497
aspath_neighbor(struct aspath *aspath)
usr.sbin/bgpd/rde_attr.c
504
if (aspath->len == 0 ||
usr.sbin/bgpd/rde_attr.c
505
aspath->data[0] != AS_SEQUENCE)
usr.sbin/bgpd/rde_attr.c
507
return (aspath_extract(aspath->data, 0));
usr.sbin/bgpd/rde_attr.c
571
aspath_countlength(struct aspath *aspath, uint16_t cnt, int headcnt)
usr.sbin/bgpd/rde_attr.c
577
seg = aspath->data;
usr.sbin/bgpd/rde_attr.c
579
for (len = aspath->len; len > 0 && cnt > 0;
usr.sbin/bgpd/rde_attr.c
607
aspath_countcopy(struct aspath *aspath, uint16_t cnt, uint8_t *buf,
usr.sbin/bgpd/rde_attr.c
620
seg = aspath->data;
usr.sbin/bgpd/rde_attr.c
621
for (len = aspath->len; len > 0 && cnt > 0;
usr.sbin/bgpd/rde_attr.c
650
aspath_loopfree(struct aspath *aspath, uint32_t myAS)
usr.sbin/bgpd/rde_attr.c
656
seg = aspath->data;
usr.sbin/bgpd/rde_attr.c
657
for (len = aspath->len; len > 0; len -= seg_size, seg += seg_size) {
usr.sbin/bgpd/rde_attr.c
711
aspath_match(struct aspath *aspath, struct filter_as *f, uint32_t neighas)
usr.sbin/bgpd/rde_attr.c
720
if (aspath_length(aspath) == 0)
usr.sbin/bgpd/rde_attr.c
728
as = aspath_neighbor(aspath);
usr.sbin/bgpd/rde_attr.c
735
seg = aspath->data;
usr.sbin/bgpd/rde_attr.c
736
len = aspath->len;
usr.sbin/bgpd/rde_attr.c
783
aspath_prepend(struct aspath *asp, uint32_t as, int quantum, uint16_t *len)
usr.sbin/bgpd/rde_attr.c
865
aspath_override(struct aspath *asp, uint32_t neighbor_as, uint32_t local_as,
usr.sbin/bgpd/rde_attr.c
907
aspath_lenmatch(struct aspath *a, enum aslen_spec type, u_int aslen)
usr.sbin/bgpd/rde_decide.c
166
if (asp1->aspath->ascnt < asp2->aspath->ascnt)
usr.sbin/bgpd/rde_decide.c
168
if (asp1->aspath->ascnt > asp2->aspath->ascnt)
usr.sbin/bgpd/rde_decide.c
185
aspath_neighbor(asp1->aspath) == aspath_neighbor(asp2->aspath)) {
usr.sbin/bgpd/rde_filter.c
101
if (state->aspath.lpref <
usr.sbin/bgpd/rde_filter.c
103
state->aspath.lpref = 0;
usr.sbin/bgpd/rde_filter.c
105
state->aspath.lpref +=
usr.sbin/bgpd/rde_filter.c
110
state->aspath.flags |= F_ATTR_MED | F_ATTR_MED_ANNOUNCE;
usr.sbin/bgpd/rde_filter.c
1103
if (state->aspath.flags & F_ATTR_PARSE_ERR)
usr.sbin/bgpd/rde_filter.c
111
state->aspath.med = set->action.metric;
usr.sbin/bgpd/rde_filter.c
114
state->aspath.flags |= F_ATTR_MED | F_ATTR_MED_ANNOUNCE;
usr.sbin/bgpd/rde_filter.c
116
if (state->aspath.med >
usr.sbin/bgpd/rde_filter.c
1163
if (state->aspath.flags & F_ATTR_PARSE_ERR)
usr.sbin/bgpd/rde_filter.c
118
state->aspath.med = UINT_MAX;
usr.sbin/bgpd/rde_filter.c
120
state->aspath.med +=
usr.sbin/bgpd/rde_filter.c
123
if (state->aspath.med <
usr.sbin/bgpd/rde_filter.c
125
state->aspath.med = 0;
usr.sbin/bgpd/rde_filter.c
127
state->aspath.med +=
usr.sbin/bgpd/rde_filter.c
132
state->aspath.weight = set->action.metric;
usr.sbin/bgpd/rde_filter.c
136
if (state->aspath.weight >
usr.sbin/bgpd/rde_filter.c
138
state->aspath.weight = UINT_MAX;
usr.sbin/bgpd/rde_filter.c
140
state->aspath.weight +=
usr.sbin/bgpd/rde_filter.c
143
if (state->aspath.weight <
usr.sbin/bgpd/rde_filter.c
145
state->aspath.weight = 0;
usr.sbin/bgpd/rde_filter.c
147
state->aspath.weight +=
usr.sbin/bgpd/rde_filter.c
154
np = aspath_prepend(state->aspath.aspath, prep_as,
usr.sbin/bgpd/rde_filter.c
156
aspath_put(state->aspath.aspath);
usr.sbin/bgpd/rde_filter.c
157
state->aspath.aspath = aspath_get(np, nl);
usr.sbin/bgpd/rde_filter.c
165
np = aspath_prepend(state->aspath.aspath, prep_as,
usr.sbin/bgpd/rde_filter.c
167
aspath_put(state->aspath.aspath);
usr.sbin/bgpd/rde_filter.c
168
state->aspath.aspath = aspath_get(np, nl);
usr.sbin/bgpd/rde_filter.c
174
np = aspath_override(state->aspath.aspath,
usr.sbin/bgpd/rde_filter.c
176
aspath_put(state->aspath.aspath);
usr.sbin/bgpd/rde_filter.c
177
state->aspath.aspath = aspath_get(np, nl);
usr.sbin/bgpd/rde_filter.c
197
pftable_unref(state->aspath.pftableid);
usr.sbin/bgpd/rde_filter.c
198
state->aspath.pftableid = pftable_ref(set->action.id);
usr.sbin/bgpd/rde_filter.c
201
rtlabel_unref(state->aspath.rtlabelid);
usr.sbin/bgpd/rde_filter.c
202
state->aspath.rtlabelid = rtlabel_ref(set->action.id);
usr.sbin/bgpd/rde_filter.c
205
state->aspath.origin = set->action.origin;
usr.sbin/bgpd/rde_filter.c
264
struct rde_aspath *asp = &state->aspath;
usr.sbin/bgpd/rde_filter.c
278
if (aspath_match(asp->aspath, &match->as,
usr.sbin/bgpd/rde_filter.c
284
if (aspath_lenmatch(asp->aspath, match->aslen.type,
usr.sbin/bgpd/rde_filter.c
344
aspath_origin(asp->aspath)) != ROA_VALID)
usr.sbin/bgpd/rde_filter.c
585
path_prep(&state->aspath);
usr.sbin/bgpd/rde_filter.c
596
path_copy(&state->aspath, asp);
usr.sbin/bgpd/rde_filter.c
620
rde_filterstate_set(state, &src->aspath, &src->communities,
usr.sbin/bgpd/rde_filter.c
640
path_clean(&state->aspath);
usr.sbin/bgpd/rde_filter.c
90
state->aspath.lpref = set->action.metric;
usr.sbin/bgpd/rde_filter.c
94
if (state->aspath.lpref >
usr.sbin/bgpd/rde_filter.c
96
state->aspath.lpref = UINT_MAX;
usr.sbin/bgpd/rde_filter.c
98
state->aspath.lpref +=
usr.sbin/bgpd/rde_rib.c
1032
nasp = &state->aspath;
usr.sbin/bgpd/rde_rib.c
1135
p->aspath = path_ref(asp);
usr.sbin/bgpd/rde_rib.c
1166
path_unref(p->aspath);
usr.sbin/bgpd/rde_rib.c
1167
p->aspath = NULL;
usr.sbin/bgpd/rde_rib.c
616
SipHash24_Update(&ctx, aspath_dump(p->aspath),
usr.sbin/bgpd/rde_rib.c
617
aspath_length(p->aspath));
usr.sbin/bgpd/rde_rib.c
648
if (aspath_compare(a->aspath, b->aspath) != 0)
usr.sbin/bgpd/rde_rib.c
689
path_getcache(struct rde_aspath *aspath)
usr.sbin/bgpd/rde_rib.c
693
aspath->hash = path_calc_hash(aspath);
usr.sbin/bgpd/rde_rib.c
694
if ((asp = CH_FIND(path_tree, &pathtable, aspath)) == NULL) {
usr.sbin/bgpd/rde_rib.c
696
asp = path_copy(path_get(), aspath);
usr.sbin/bgpd/rde_rib.c
741
dst->aspath = aspath_copy(src->aspath);
usr.sbin/bgpd/rde_rib.c
792
aspath_put(asp->aspath);
usr.sbin/bgpd/rde_rib.c
793
asp->aspath = NULL;
usr.sbin/bgpd/rde_rib.c
861
struct rde_aspath *asp, *nasp = &state->aspath;
usr.sbin/bgpd/rde_rib.c
975
if (p->aspath && p->aspath->pftableid)
usr.sbin/bgpd/rde_rib.c
976
rde_pftable_del(p->aspath->pftableid, p);
usr.sbin/bgpd/rde_update.c
1185
if (up_generate_attr(buf, peer, pa->attrs->aspath,
usr.sbin/bgpd/rde_update.c
128
if (state->aspath.flags & F_ATTR_OTC)
usr.sbin/bgpd/rde_update.c
137
if ((state->aspath.flags & F_ATTR_OTC) == 0) {
usr.sbin/bgpd/rde_update.c
141
if (attr_optadd(&state->aspath,
usr.sbin/bgpd/rde_update.c
146
state->aspath.flags |= F_ATTR_OTC;
usr.sbin/bgpd/rde_update.c
422
asp = &state.aspath;
usr.sbin/bgpd/rde_update.c
423
asp->aspath = aspath_get(NULL, 0);
usr.sbin/bgpd/rde_update.c
570
np = aspath_prepend(state->aspath.aspath, prep_as, 1, &nl);
usr.sbin/bgpd/rde_update.c
571
aspath_put(state->aspath.aspath);
usr.sbin/bgpd/rde_update.c
572
state->aspath.aspath = aspath_get(np, nl);
usr.sbin/bgpd/rde_update.c
620
plen = aspath_length(asp->aspath);
usr.sbin/bgpd/rde_update.c
621
pdata = aspath_dump(asp->aspath);
usr.sbin/bgpd/rde_update.c
693
plen = aspath_length(asp->aspath);
usr.sbin/bgpd/rde_update.c
694
pdata = aspath_dump(asp->aspath);