Nut/OS  4.10.3
API Reference
icmp-udp.c File Reference
#include <string.h>
#include <stdio.h>
#include <io.h>
#include <errno.h>
#include <dev/board.h>
#include <sys/thread.h>
#include <sys/timer.h>
#include <sys/socket.h>
#include <sys/confnet.h>
#include <arpa/inet.h>
#include <net/route.h>
Include dependency graph for icmp-udp.c:

Go to the source code of this file.

Defines

#define MY_MAC   {0x00,0x06,0x98,0x20,0x00,0x00}
#define MY_IP   "192.168.1.100"
#define MY_MASK   "255.255.255.0"
#define MY_GATE   "192.168.1.254"
#define UDP_ECHO_IP   "192.168.1.103"
#define UDP_ECHO_PORT   7
#define UDP_BUFF_SIZE   256

Functions

void print_udp_icmp_error (uint32_t remote_ip, uint16_t remote_port, int error)
void UDPReceiver (void *arg)
int main (void)

Define Documentation

#define MY_MAC   {0x00,0x06,0x98,0x20,0x00,0x00}

Definition at line 68 of file icmp-udp.c.

#define MY_IP   "192.168.1.100"
Examples:
icmp-udp/icmp-udp.c, inetq/inetq.c, and portdio/portdio.c.

Definition at line 69 of file icmp-udp.c.

Referenced by main().

#define MY_MASK   "255.255.255.0"
Examples:
icmp-udp/icmp-udp.c, inetq/inetq.c, and portdio/portdio.c.

Definition at line 70 of file icmp-udp.c.

Referenced by main().

#define MY_GATE   "192.168.1.254"
Examples:
icmp-udp/icmp-udp.c, and inetq/inetq.c.

Definition at line 71 of file icmp-udp.c.

Referenced by main().

#define UDP_ECHO_IP   "192.168.1.103"
Examples:
icmp-udp/icmp-udp.c.

Definition at line 73 of file icmp-udp.c.

Referenced by main().

#define UDP_ECHO_PORT   7
Examples:
icmp-udp/icmp-udp.c.

Definition at line 74 of file icmp-udp.c.

Referenced by main().

#define UDP_BUFF_SIZE   256
Examples:
icmp-udp/icmp-udp.c.

Definition at line 92 of file icmp-udp.c.

Referenced by main(), and UDPReceiver().


Function Documentation

void print_udp_icmp_error ( uint32_t  remote_ip,
uint16_t  remote_port,
int  error 
)
Examples:
icmp-udp/icmp-udp.c.

Definition at line 101 of file icmp-udp.c.

References ECONNREFUSED, EHOSTDOWN, EHOSTUNREACH, EMSGSIZE, ENETUNREACH, ENOPROTOOPT, EOPNOTSUPP, inet_ntoa(), and printf.

Referenced by main(), and UDPReceiver().

Here is the call graph for this function:

void UDPReceiver ( void *  arg)
Examples:
icmp-udp/icmp-udp.c.

Definition at line 133 of file icmp-udp.c.

References NutUdpError(), NutUdpReceiveFrom(), print_udp_icmp_error(), printf, and UDP_BUFF_SIZE.

Referenced by main().

Here is the call graph for this function: