chiark / gitweb /
working on new addrmap instead of maskmap - compiles, but have not yet implemented...
[chiark-tcl.git] / base / tables-examples.tct
index f8d44ef0d2c592c03fabf613b8a1269747104f8b..7ce5dc7f671bfcf61842961ba4169843c996d077 100644 (file)
@@ -2,17 +2,29 @@ Type hb:                      HBytes_Value @
 Init hb                                hbytes_sentinel(&@);
 
 Type hbv:                      HBytes_Var @
-Init hbv                       @.hb=0; @.obj=0; @.var=0; @.copied=0;
-Fini hbv                       fini_hbv(ip, rc, &@);
+Init hbv                       @.hb=0; init_somethingv(&@.sth);
+Fini hbv                       fini_somethingv(ip, rc, &@.sth);
+
+Type constv(Tcl_ObjType*):     Tcl_Obj *@
+
+Type addrmapv:                 AddrMap_Var @
+Init addrmapv                  @.am=0; init_somethingv(&@.sth);
+Fini addrmapv                  fini_somethingv(ip, rc, &@.sth);
 
 Type sockaddr:                 SockAddr_Value @
 Init sockaddr                  sockaddr_clear(&@);
 
-Type iddata(IdDataTable *tab): void *@
+Type iddata(const IdDataSpec *idds):   void *@
 Type ulong:                    uint32_t @
 Type long:                     long @
 Type string:                   const char *@
 
+Type adnsresults:              adns_answer *@
+Init adnsresults               @=0;
+Fini adnsresults               free(@);
+
+Type charfrom(const char *opts, const char *what):     int
+
 H-Include      "hbytes.h"
 
 Table toplevel TopLevel_Command
@@ -28,6 +40,56 @@ Table toplevel TopLevel_Command
        ulong
                subcmd  enum(ULong_SubCommand,"ulong subcommand")
                ...     obj
+       adns
+               subcmd  enum(Adns_SubCommand,"adns subcommand")
+               ...     obj
+
+Table adns Adns_SubCommand
+       lookup
+               rrtype  enum(AdnsTclRRTypeInfo, "rrtype")
+               domain  string
+               ...     obj
+               =>      obj
+       synch
+               rrtype  enum(AdnsTclRRTypeInfo, "rrtype")
+               domain  string
+               ...     obj
+               =>      obj
+       asynch
+               on_yes  obj
+               on_no   obj
+               on_fail obj
+               xargs   obj
+               rrtype  enum(AdnsTclRRTypeInfo, "rrtype")
+               domain  string
+               ...     obj
+               =>      iddata(&adnstcl_queries)
+       asynch-cancel
+               query   iddata(&adnstcl_queries)
+       new-resolver
+               ...     obj
+               =>      iddata(&adnstcl_resolvers)
+       set-default-resolver
+               res     iddata(&adnstcl_resolvers)
+       destroy-resolver
+               res     iddata(&adnstcl_resolvers)
+
+Table addrmap AddrMap_SubCommand
+       lookup
+               map     constv(&addrmap_type)
+               addr    hb
+               ?def    obj
+               =>      obj
+       amend-range
+               map     addrmapv
+               start   hb
+               end     hb
+               data    obj
+       amend-mask
+               map     addrmapv
+               prefix  hb
+               preflen obj
+               data    obj
 
 Table ulong ULong_SubCommand
        ul2int
@@ -161,6 +223,9 @@ Table hbytes HBytes_SubCommand
                prop    enum(HashAlgPropInfo, "prop")
                alg     enum(HashAlgInfo, "alg")
                =>      int
+       addr-map
+               subcmd  enum(AddrMap_SubCommand, "hbytes addr-map subcommand")
+               ...     obj
 
 Table padmethodinfo PadMethodInfo
        pkcs5