#include "config.h"#include "lfs.h"#include <sys/ioctl.h>#include <sys/socket.h>#include <sys/types.h>#include <unistd.h>#include <netinet/tcp.h>#include <netinet/in.h>#include <netdb.h>#include <stdio.h>#include <fcntl.h>#include <syslog.h>#include <stdlib.h>#include <linux/ioctl.h>#include "cliserv.h"Go to the source code of this file.
Defines | |
| #define | MY_NAME "nbd_client" |
Functions | |
| int | opennet (char *name, int port) |
| u64 | negotiate (int sock, int blocksize) |
| void | setsizes (int nbd, u64 size64, int blocksize) |
| void | finish_sock (int sock, int nbd, int swap) |
| int | main (int argc, char *argv[]) |
| #define MY_NAME "nbd_client" |
| void finish_sock | ( | int | sock, | |
| int | nbd, | |||
| int | swap | |||
| ) |
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) |
Definition at line 148 of file nbd-client.c.
References err(), finish_sock(), logging(), negotiate(), opennet(), PACKAGE_VERSION, and setsizes().
| u64 negotiate | ( | int | sock, | |
| int | blocksize | |||
| ) |
Definition at line 62 of file nbd-client.c.
References cliserv_magic, err(), INIT_PASSWD, and ntohll().
Referenced by main(), and mainloop().
| int opennet | ( | char * | name, | |
| int | port | |||
| ) |
Definition at line 39 of file nbd-client.c.
References err(), and setmysockopt().
Referenced by main().
| void setsizes | ( | int | nbd, | |
| u64 | size64, | |||
| int | blocksize | |||
| ) |
1.5.3