Nut/OS  5.0.5
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:

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}
#define MY_IP   "192.168.1.100"
Examples:
icmp-udp/icmp-udp.c, inetq/inetq.c, and portdio/portdio.c.

Referenced by main().

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

Referenced by main().

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

Referenced by main().

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

Referenced by main().

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

Referenced by main().

#define UDP_BUFF_SIZE   256
Examples:
icmp-udp/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.

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.

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

Referenced by main().

Here is the call graph for this function: