]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Possibility to access first extended attributes.
authorPavel Machek <pavel@ucw.cz>
Thu, 4 Nov 1999 13:33:30 +0000 (13:33 +0000)
committerPavel Machek <pavel@ucw.cz>
Thu, 4 Nov 1999 13:33:30 +0000 (13:33 +0000)
filter/config.Y
filter/filter.c

index d9f72fb50b3226eff78caf129ad6a9fc8408559c..a0881ae785ec07b88c6e581371407deeb4325026 100644 (file)
@@ -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
index e913bf601e53496957810c75edfbeb8cae096e23..99d47bc1fc51bb0e8a85eff58f090e5b5df9e81a 100644 (file)
@@ -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;