projects
/
nbd.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r49: Doxygenified the source, and started modularizing it. Lots of work
[nbd.git]
/
nbd-client.c
diff --git
a/nbd-client.c
b/nbd-client.c
index
379a3bd
..
094b775
100644
(file)
--- a/
nbd-client.c
+++ b/
nbd-client.c
@@
-34,6
+34,12
@@
#include <linux/ioctl.h>
#include "cliserv.h"
#include <linux/ioctl.h>
#include "cliserv.h"
+/**
+ * Open a connection to a given host on a given port.
+ * @param name The host to connect to
+ * @param port The port to connect to
+ * @return A connected socket to the given host on the given port
+ **/
int opennet(char *name, int port)
{
int sock;
int opennet(char *name, int port)
{
int sock;
@@
-58,6
+64,11
@@
int opennet(char *name, int port)
return sock;
}
return sock;
}
+/**
+ * Do everything
+ * @todo cut this thing into little tiny manageable pieces, preferably with a
+ * chainsaw.
+ **/
int main(int argc, char *argv[])
{
int port, sock, nbd, one = 1;
int main(int argc, char *argv[])
{
int port, sock, nbd, one = 1;