summaryrefslogtreecommitdiffstats
path: root/sbin/hastd/proto.h
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-02-02 15:53:09 +0000
committerpjd <pjd@FreeBSD.org>2011-02-02 15:53:09 +0000
commit95c40e7f0914505b7f251ea147472c9de5e76cec (patch)
treeb73620e3d4537cc1721f8ed469dde072dacf2fe0 /sbin/hastd/proto.h
parent1267c20f911e08de277a22060d9bc42148f9afc0 (diff)
downloadFreeBSD-src-95c40e7f0914505b7f251ea147472c9de5e76cec.zip
FreeBSD-src-95c40e7f0914505b7f251ea147472c9de5e76cec.tar.gz
- Rename proto_descriptor_{send,recv}() functions to
proto_connection_{send,recv} and change them to return proto_conn structure. We don't operate directly on descriptors, but on proto_conns. - Add wrap method to wrap descriptor with proto_conn. - Remove methods to send and receive descriptors and implement this functionality as additional argument to send and receive methods. MFC after: 1 week
Diffstat (limited to 'sbin/hastd/proto.h')
-rw-r--r--sbin/hastd/proto.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/hastd/proto.h b/sbin/hastd/proto.h
index 39beb3f..278fe78 100644
--- a/sbin/hastd/proto.h
+++ b/sbin/hastd/proto.h
@@ -44,8 +44,10 @@ int proto_server(const char *addr, struct proto_conn **connp);
int proto_accept(struct proto_conn *conn, struct proto_conn **newconnp);
int proto_send(const struct proto_conn *conn, const void *data, size_t size);
int proto_recv(const struct proto_conn *conn, void *data, size_t size);
-int proto_descriptor_send(const struct proto_conn *conn, int fd);
-int proto_descriptor_recv(const struct proto_conn *conn, int *fdp);
+int proto_connection_send(const struct proto_conn *conn,
+ struct proto_conn *mconn);
+int proto_connection_recv(const struct proto_conn *conn, bool client,
+ struct proto_conn **newconnp);
int proto_descriptor(const struct proto_conn *conn);
bool proto_address_match(const struct proto_conn *conn, const char *addr);
void proto_local_address(const struct proto_conn *conn, char *addr,
OpenPOWER on IntegriCloud