|
miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
|
Minimal TCP client that bridges stdin/stdout to a socket. More...
#include <errno.h>#include <netinet/in.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/socket.h>#include <unistd.h>
Macros | |
| #define | NC_BUF_SIZE 512 |
Functions | |
| static void | print_usage (const char *prog) |
| static int | write_all (int fd, const char *buf, size_t len) |
| static int | parse_port (const char *text) |
| static unsigned short | net_htons (unsigned short v) |
| static int | parse_ipv4 (const char *text, in_addr_t *addr_out) |
| int | main (int argc, char *argv[]) |
Minimal TCP client that bridges stdin/stdout to a socket.
| #define NC_BUF_SIZE 512 |
| int main | ( | int | argc, |
| char * | argv[] ) |

|
static |

|
static |

|
static |

|
static |

|
static |

