chiark / gitweb /
working on compiling out of troglodyte; before relegage maskmap
[chiark-tcl.git] / hbytes / hbytes.tct
index 727591d..abfd45a 100644 (file)
@@ -1,32 +1,20 @@
 Type hb:                       HBytes_Value @
-Init hb                                hbytes_sentinel(&@);
+Init hb                                cht_hb_sentinel(&@);
 
 Type hbv:                      HBytes_Var @
-Init hbv                       @.hb=0; init_somethingv(&@.sth);
-Fini hbv                       fini_somethingv(ip, rc, &@.sth);
+Init hbv                       @.hb=0; cht_init_somethingv(&@.sth);
+Fini hbv                       cht_fini_somethingv(ip, rc, &@.sth);
 
 Type addrmapv:                 AddrMap_Var @
-Init addrmapv                  @.am=0; init_somethingv(&@.sth);
-Fini addrmapv                  fini_somethingv(ip, rc, &@.sth);
+Init addrmapv                  @.am=0; cht_init_somethingv(&@.sth);
+Fini addrmapv                  cht_fini_somethingv(ip, rc, &@.sth);
 
-Type sockaddr:                 SockAddr_Value @
-Init sockaddr                  sockaddr_clear(&@);
-
-Table toplevel TopLevel_Command
+Table hbytestoplevel TopLevel_Command
        hbytes
-               subcmd  enum(HBytes_SubCommand, "hbytes subcommand")
-               ...     obj
-       dgram-socket
-               subcmd  enum(DgramSocket_SubCommand,"dgram-socket subcommand")
+               subcmd  enum(HBytes/_SubCommand, "hbytes subcommand")
                ...     obj
-       tuntap-socket-raw
-           subcmd enum(TunSocket_SubCommand,"tuntap-socket-raw subcommand")
-           ... obj
        ulong
-               subcmd  enum(ULong_SubCommand,"ulong subcommand")
-               ...     obj
-       adns
-               subcmd  enum(Adns_SubCommand,"adns subcommand")
+               subcmd  enum(ULong/_SubCommand, "ulong subcommand")
                ...     obj
 
 Table ulong ULong_SubCommand
@@ -138,97 +126,24 @@ Table hbytes HBytes_SubCommand
        random
                length  int
                =>      hb
-       pad
-               op      enum(PadOp, "hbytes pad subcommand")
-               v       hbv
-               blocksz obj
-               meth    enum(PadMethodInfo, "pad method")
-               ...     methargs
-       blockcipher
-               op      enum(BlockCipherOp, "op")
-               ...     obj
-       hash
-               alg     enum(HashAlgInfo, "hash alg")
-               message hb
-               =>      hb
-       hmac
-               alg     enum(HashAlgInfo, "hash alg for hmac")
-               message hb
-               key     obj
-               ?maclen obj
-               =>      hb
-       hash-prop
-               prop    enum(HashAlgPropInfo, "prop")
-               alg     enum(HashAlgInfo, "alg")
-               =>      int
-       addr-map
-               subcmd  enum(AddrMap_SubCommand, "hbytes addr-map subcommand")
-               ...     obj
-
-Table padmethodinfo PadMethodInfo
-       pkcs5
-               =>      int
-       rfc2406
-               nxthdr  obj
-               =>      int
-
-Table dgram_socket DgramSocket_SubCommand
-       create
-               local   sockaddr
-               =>      iddata(&dgram_socks)
-       close
-               sock    iddata(&dgram_socks)
-       transmit
-               sock    iddata(&dgram_socks)
-               data    hb
-               remote  sockaddr
-       on-receive
-               sock    iddata(&dgram_socks)
-               ?script obj
+#      addr-map
+#              subcmd  enum(AddrMap/_SubCommand, "hbytes addr-map subcommand")
+#              ...     obj
 
-Table tuntap_socket_raw TunSocket_SubCommand
-       create
-               ?ifname string
-               =>      iddata(&tuntap_socks)
-       close
-               sock    iddata(&tuntap_socks)
-       ifname
-               sock    iddata(&tuntap_socks)
-               =>      string
-       receive
-               sock    iddata(&tuntap_socks)
-               data    hb
-       on-transmit
-               sock    iddata(&tuntap_socks)
-               mtu     long
-               ?script obj
-
-Table blockcipherop BlockCipherOp
-       e       1
-               v       hbv
-               alg     enum(BlockCipherAlgInfo, "alg")
-               key     obj
-               mode    enum(BlockCipherModeInfo, "mode")
-               ?iv     hb
-               =>      hb
-       d       0
-               v       hbv
-               alg     enum(BlockCipherAlgInfo, "alg")
-               key     obj
-               mode    enum(BlockCipherModeInfo, "mode")
-               ?iv     hb
-               =>      hb
-       mac     -1
-               msg     hb
-               alg     enum(BlockCipherAlgInfo, "alg")
-               key     obj
-               mode    enum(BlockCipherModeInfo, "mode")
-               iv      hb
-               =>      hb
-       prop    -1
-               prop    enum(BlockCipherPropInfo, "prop")
-               alg     enum(BlockCipherAlgInfo, "alg")
-               =>      int
+#Table addrmap AddrMap_SubCommand
+#      lookup
+#              map     constv(&cht_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
 
-EntryExtra BlockCipherOp
-       int encrypt;