From: Pavel Machek Date: Thu, 4 Nov 1999 13:33:30 +0000 (+0000) Subject: Possibility to access first extended attributes. X-Git-Tag: v1.2.0~1476 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=91447965fed2728a1f877e21f7f58aab4c0022c7;p=thirdparty%2Fbird.git Possibility to access first extended attributes. --- diff --git a/filter/config.Y b/filter/config.Y index d9f72fb50..a0881ae78 100644 --- a/filter/config.Y +++ b/filter/config.Y @@ -11,6 +11,8 @@ FIXME: create community lists FIXME: access to dynamic attributes FIXME: local namespace for functions + FIXME: enumerational types + FIXME: defined() keyword */ CF_HDR diff --git a/filter/filter.c b/filter/filter.c index e913bf601..99d47bc1f 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -305,7 +305,19 @@ interpret(struct f_inst *what) } break; case 'ea': /* Access to extended attributes [hmm, but we need it read/write, do we?] */ - bug( "Implement me" ); + { + eattr *e = ea_find( (*f_rte)->attrs->eattrs, what->a2.i ); + if (!e) { + res.type = T_VOID; + break; + } + res.type = what->a1.i; + switch (what->a1.i) { + case T_INT: + res.val.i = e->u.data; + break; + } + } break; case 'cp': /* Convert prefix to ... */ ONEARG;