chiark / gitweb /
finalise 1.2.1
[chiark-tcl.git] / dgram / dgram.h
index d95185c9e890467f201e6c061daefe7550be0c2f..6c31f18b3ab45aa08ccbcf962f0f41b5a2da89d0 100644 (file)
@@ -1,3 +1,25 @@
+/* dgram - Tcl extension for udp datagrams
+ * Copyright 2006-2012 Ian Jackson
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef DGRAM_H
+#define DGRAM_H
+
+#include "hbytes.h"
+
 /* from sockaddr.c */
 
 typedef struct {
@@ -6,17 +28,20 @@ typedef struct {
 
 extern Tcl_ObjType sockaddr_type;
 
-void sockaddr_clear(SockAddr_Value*);
-void sockaddr_create(SockAddr_Value*, const struct sockaddr *addr, int len);
-int sockaddr_len(const SockAddr_Value*);
-const struct sockaddr *sockaddr_addr(const SockAddr_Value*);
-void sockaddr_free(const SockAddr_Value*);
+void cht_sockaddr_clear(SockAddr_Value*);
+void cht_sockaddr_create(SockAddr_Value*, const struct sockaddr *addr, int al);
+int cht_sockaddr_len(const SockAddr_Value*);
+const struct sockaddr *cht_sockaddr_addr(const SockAddr_Value*);
+void cht_sockaddr_free(const SockAddr_Value*);
 
 /* from dgram.c */
 
-extern const IdDataSpec dgram_socks;
+extern const IdDataSpec cht_dgram_socks;
 
 /* from misc.c */
 
-int setnonblock(int fd, int isnonblock);
+int cht_setnonblock(int fd, int isnonblock);
+
+#include "dgram+tcmdif.h"
 
+#endif /*DGRAM_H*/