#include <stdio.h>
#include <getopt.h>
#include <stdlib.h>
#include "natblaster_peer.h"
#include "errorcodes.h"
#include "def.h"
#include "berkeleyapi.h"
#include "nethelp.h"
Go to the source code of this file.
Defines | |
#define | BUFSIZE 64 |
size of buffer to receive a message from the buddy in | |
Functions | |
int | getArgs (int argc, char *argv[], char **helper_ip, port_t *helper_port, char **peer_ip, port_t *peer_port, char **buddy_ext_ip, char **buddy_int_ip, port_t *buddy_int_port, char **dev, char **msg, flag_t *random) |
gets arguments from the command line | |
void | printUse () |
prints the program use | |
int | main (int argc, char *argv[]) |
entry point for peer stub application |
Definition in file peer.c.
|
gets arguments from the command line uses errorcodes.h for error codes
Definition at line 160 of file peer.c. References CHECK_NOT_NEG, CHECK_NOT_NULL, ERROR_NULL_ARG_1, ERROR_NULL_ARG_10, ERROR_NULL_ARG_11, ERROR_NULL_ARG_12, ERROR_NULL_ARG_2, ERROR_NULL_ARG_3, ERROR_NULL_ARG_4, ERROR_NULL_ARG_5, ERROR_NULL_ARG_6, ERROR_NULL_ARG_7, ERROR_NULL_ARG_8, and ERROR_NULL_ARG_9. Referenced by main(). |
|
entry point for peer stub application
Definition at line 87 of file peer.c. References CHECK_FAILED, ERROR_1, ERROR_2, ERROR_3, ERROR_4, FAILED, flag_t, getArgs(), ip_t, natblaster_connect(), port_t, printUse(), resolveIP(), and sock_t. |
|
prints the program use
|