25 if (nargs == 2 &&
strncmp(args[1],
"--help", 7) == 0) {
26 printf(
"Use: %s\n\n", args[0]);
28 printf(
"\tBecome a UDP echo server\n");
30 printf(
"\t--help\t display this help and exit\n");
46 "%s: could not obtain a local IP address\n",
56 args[0], echoserverport);
64 sizeof(buff), 600000);
68 }
else if (retval ==
SYSERR) {
74 retval =
udp_sendto(slot, remip, remport, buff, msglen);
int32 strncmp(const char *, const char *, int32)
shellcmd xsh_udpeserver(int nargs, char *args[])
int32 udp_recvaddr(uid32, uint32 *, uint16 *, char *, int32, uint32)
int32 printf(const char *,...)
#define TIMEOUT
システムコールがタイムアウトした場合
#define TRUE
Boolean True(1)
int int32
符号あり32ビット整数(int)
uid32 udp_register(uint32, uint16, uint16)
unsigned short uint16
符号なし16ビット整数(unsigned short)
int32 shellcmd
シェルコール関数 返り値の型
int32 fprintf(int, char *,...)
status udp_sendto(uid32, uint32, uint16, char *, int32)
unsigned int uint32
符号なし32ビット整数(unsigned int)