Whamcloud - gitweb
- merge 0.7rc1 from b_devel to HEAD (20030612 merge point)
[fs/lustre-release.git] / lnet / ulnds / connection.h
diff --git a/lnet/ulnds/connection.h b/lnet/ulnds/connection.h
new file mode 100644 (file)
index 0000000..6f57287
--- /dev/null
@@ -0,0 +1,32 @@
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ *
+ *  Copyright (c) 2002 Cray Inc.
+ *
+ *   This file is part of Portals, http://www.sf.net/projects/sandiaportals/
+ */
+
+#include <table.h>
+
+typedef struct manager {
+    table connections;
+    int bound;
+    io_handler bound_handler;
+    int (*handler)(void *, void *);
+    void *handler_arg;
+    unsigned short port;
+} *manager;
+
+
+typedef struct connection {
+    unsigned int ip;
+    unsigned short port;
+    int fd;
+    manager m;
+} *connection;
+
+connection force_tcp_connection(manager m, unsigned int ip, unsigned int short);
+manager init_connections(unsigned short, int (*f)(void *, void *), void *);
+void remove_connection(void *arg);
+void shutdown_connections(manager m);
+int read_connection(connection c, unsigned char *dest, int len);