return TCL_ERROR;
}
+int newfdposixerr(Tcl_Interp *ip, int fd, const char *m) {
+ int e;
+ e= errno;
+ close(fd);
+ return posixerr(ip,e,m);
+}
+
void objfreeir(Tcl_Obj *o) {
if (o->typePtr && o->typePtr->freeIntRepProc)
o->typePtr->freeIntRepProc(o);
return TCL_OK;
}
+int do_hbytes_xor(ClientData cd, Tcl_Interp *ip,
+ HBytes_Var v, HBytes_Value d) {
+ int l;
+ Byte *dest;
+ const Byte *source;
+
+ l= hbytes_len(v.hb);
+ if (hbytes_len(&d) != l) return
+ staticerr(ip, "hbytes xor lengths do not match", "HBYTES LENGTH MISMATCH");
+
+ dest= hbytes_data(v.hb);
+ source= hbytes_data(&d);
+ memxor(dest,source,l);
+ return TCL_OK;
+}
+
int do_hbytes_zeroes(ClientData cd, Tcl_Interp *ip,
int length, HBytes_Value *result) {
Byte *space;
return TCL_OK;
}
+int do_hbytes_mask_map(ClientData cd, Tcl_Interp *ip,
+ const MaskMap_SubCommand *subcmd,
+ int objc, Tcl_Obj *const *objv) {
+ return subcmd->func(0,ip,objc,objv);
+}
+
/* hbytes representing uint16_t's */
int do_hbytes_h2ushort(ClientData cd, Tcl_Interp *ip,
return subcmd->func(0,ip,objc,objv);
}
+int do_toplevel_tuntap_socket_raw(ClientData cd, Tcl_Interp *ip,
+ const TunSocket_SubCommand *subcmd,
+ int objc, Tcl_Obj *const *objv) {
+ return subcmd->func(0,ip,objc,objv);
+}
+
int do_toplevel_ulong(ClientData cd, Tcl_Interp *ip,
const ULong_SubCommand *subcmd,
int objc, Tcl_Obj *const *objv) {
Tcl_RegisterObjType(&enum_nearlytype);
Tcl_RegisterObjType(&enum1_nearlytype);
Tcl_RegisterObjType(&sockaddr_type);
- Tcl_RegisterObjType(&dgramsockid_type);
+ Tcl_RegisterObjType(&tabledataid_nearlytype);
Tcl_RegisterObjType(&ulong_type);
+ Tcl_RegisterObjType(&maskmap_type);
for (cmd=toplevel_commands;
cmd->name;
cmd++)
- Tcl_CreateObjCommand(ip, cmd->name, cmd->func, 0,0);
+ Tcl_CreateObjCommand(ip, (char*)cmd->name, cmd->func, 0,0);
return TCL_OK;
}