diff options
author | Pavel Machek <pavel@ucw.cz> | 1999-11-04 14:33:30 +0100 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 1999-11-04 14:33:30 +0100 |
commit | 91447965fed2728a1f877e21f7f58aab4c0022c7 (patch) | |
tree | e082df445911f83e042cfe61f4805261d29c832c /filter/filter.c | |
parent | 2727bb7c5bbdac54661a5097f86d979799095db8 (diff) | |
download | bird-91447965fed2728a1f877e21f7f58aab4c0022c7.tar bird-91447965fed2728a1f877e21f7f58aab4c0022c7.zip |
Possibility to access first extended attributes.
Diffstat (limited to 'filter/filter.c')
-rw-r--r-- | filter/filter.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/filter/filter.c b/filter/filter.c index e913bf6..99d47bc 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; |