XINU
|
#include <xinu.h>
Go to the source code of this file.
Functions | |
void | udp_hton (struct netpacket *pktptr) |
void | udp_in (struct netpacket *pktptr) |
void | udp_init (void) |
void | udp_ntoh (struct netpacket *pktptr) |
int32 | udp_recv (uid32 slot, char *buff, int32 len, uint32 timeout) |
int32 | udp_recvaddr (uid32 slot, uint32 *remip, uint16 *remport, char *buff, int32 len, uint32 timeout) |
uid32 | udp_register (uint32 remip, uint16 remport, uint16 locport) |
status | udp_release (uid32 slot) |
status | udp_send (uid32 slot, char *buff, int32 len) |
status | udp_sendto (uid32 slot, uint32 remip, uint16 remport, char *buff, int32 len) |
Variables | |
struct udpentry | udptab [UDP_SLOTS] |
void udp_hton | ( | struct netpacket * | pktptr | ) |
Definition at line 567 of file udp.c.
References htons, netpacket::net_udpdport, netpacket::net_udplen, and netpacket::net_udpsport.
Referenced by ip_out().
void udp_in | ( | struct netpacket * | pktptr | ) |
Definition at line 29 of file udp.c.
References disable(), freebuf(), netpacket::net_ipsrc, netpacket::net_udpdport, netpacket::net_udpsport, OK, restore(), send(), udpentry::udcount, udpentry::udlocport, UDP_FREE, UDP_QSIZ, UDP_RECV, UDP_SLOTS, UDP_USED, udpentry::udpid, udptab, udpentry::udqueue, udpentry::udremip, udpentry::udremport, udpentry::udstate, and udpentry::udtail.
Referenced by ip_local().
void udp_init | ( | void | ) |
Definition at line 12 of file udp.c.
References UDP_FREE, UDP_SLOTS, udptab, and udpentry::udstate.
Referenced by net_init().
void udp_ntoh | ( | struct netpacket * | pktptr | ) |
Definition at line 553 of file udp.c.
References netpacket::net_udpdport, netpacket::net_udplen, netpacket::net_udpsport, and ntohs.
Referenced by ip_in().
Definition at line 146 of file udp.c.
References currpid, disable(), freebuf(), if(), netpacket::net_udpdata, netpacket::net_udplen, OK, recvclr(), recvtime(), restore(), SYSERR, TIMEOUT, udpentry::udcount, udpentry::udhead, UDP_HDR_LEN, UDP_QSIZ, UDP_RECV, UDP_SLOTS, UDP_USED, udpentry::udpid, udptab, udpentry::udqueue, and udpentry::udstate.
Referenced by dnslookup(), getlocalip(), getutime(), rdscomm(), rfscomm(), and xsh_udpecho().
int32 udp_recvaddr | ( | uid32 | slot, |
uint32 * | remip, | ||
uint16 * | remport, | ||
char * | buff, | ||
int32 | len, | ||
uint32 | timeout | ||
) |
Definition at line 227 of file udp.c.
References currpid, disable(), freebuf(), if(), netpacket::net_ipsrc, netpacket::net_udpdata, netpacket::net_udplen, netpacket::net_udpsport, OK, recvclr(), recvtime(), restore(), SYSERR, TIMEOUT, udpentry::udcount, udpentry::udhead, UDP_HDR_LEN, UDP_QSIZ, UDP_RECV, UDP_SLOTS, UDP_USED, udpentry::udpid, udptab, udpentry::udqueue, and udpentry::udstate.
Referenced by tftp_send1(), and xsh_udpeserver().
Definition at line 85 of file udp.c.
References disable(), restore(), SYSERR, udpentry::udcount, udpentry::udhead, udpentry::udlocport, UDP_FREE, UDP_SLOTS, UDP_USED, udpentry::udpid, udptab, udpentry::udremip, udpentry::udremport, udpentry::udstate, and udpentry::udtail.
Referenced by dnslookup(), getlocalip(), getutime(), rdscomm(), rfscomm(), tftpget_mb(), xsh_udpecho(), and xsh_udpeserver().
Definition at line 502 of file udp.c.
References DEFER_START, DEFER_STOP, disable(), freebuf(), OK, resched_cntl(), restore(), SYSERR, udpentry::udcount, udpentry::udhead, UDP_FREE, UDP_QSIZ, UDP_SLOTS, udptab, udpentry::udqueue, and udpentry::udstate.
Referenced by dnslookup(), getlocalip(), getutime(), tftpget_mb(), and xsh_udpecho().
Definition at line 316 of file udp.c.
References disable(), ETH_ADDR_LEN, ETH_HDR_LEN, network::ethucast, getbuf(), ip_send(), IP_UDP, network::ipucast, memcpy(), netpacket::net_ethsrc, netpacket::net_ethtype, netpacket::net_ipcksum, netpacket::net_ipdst, netpacket::net_ipfrag, netpacket::net_ipid, netpacket::net_iplen, netpacket::net_ipproto, netpacket::net_ipsrc, netpacket::net_iptos, netpacket::net_ipttl, netpacket::net_ipvh, netpacket::net_udpcksum, netpacket::net_udpdata, netpacket::net_udpdport, netpacket::net_udplen, netpacket::net_udpsport, netbufpool, NetData, OK, restore(), SYSERR, udpentry::udlocport, UDP_FREE, UDP_HDR_LEN, UDP_SLOTS, udptab, udpentry::udremip, udpentry::udremport, and udpentry::udstate.
Referenced by dnslookup(), getutime(), rfscomm(), and xsh_udpecho().
Definition at line 417 of file udp.c.
References disable(), ETH_ADDR_LEN, ETH_HDR_LEN, network::ethucast, getbuf(), ip_send(), IP_UDP, network::ipucast, memcpy(), netpacket::net_ethsrc, netpacket::net_ethtype, netpacket::net_ipcksum, netpacket::net_ipdst, netpacket::net_ipfrag, netpacket::net_ipid, netpacket::net_iplen, netpacket::net_ipproto, netpacket::net_ipsrc, netpacket::net_iptos, netpacket::net_ipttl, netpacket::net_ipvh, netpacket::net_udpcksum, netpacket::net_udpdata, netpacket::net_udpdport, netpacket::net_udplen, netpacket::net_udpsport, netbufpool, NetData, OK, restore(), SYSERR, udpentry::udlocport, UDP_FREE, UDP_HDR_LEN, UDP_SLOTS, udptab, and udpentry::udstate.
Referenced by getlocalip(), rdscomm(), tftp_send1(), tftpget_mb(), and xsh_udpeserver().
Definition at line 6 of file udp.c.
Referenced by udp_in(), udp_init(), udp_recv(), udp_recvaddr(), udp_register(), udp_release(), udp_send(), udp_sendto(), and xsh_udpdump().