#include "inet.h"#include "type.h"#include "assert.h"#include "buf.h"#include "clock.h"#include "icmp_lib.h"#include "io.h"#include "ip.h"#include "sr.h"#include "udp.h"#include "udp_int.h"Include dependency graph for udp.c:

Go to the source code of this file.
Functions | |
| THIS_FILE FORWARD void read_ip_packets | ARGS ((udp_port_t *udp_port)) |
| FORWARD void udp_buffree | ARGS ((int priority)) |
| FORWARD int udp_select | ARGS ((int fd, unsigned operations)) |
| FORWARD acc_t *udp_get_data | ARGS ((int fd, size_t offset, size_t count, int for_ioctl)) |
| FORWARD int udp_put_data | ARGS ((int fd, size_t offset, acc_t *data, int for_ioctl)) |
| FORWARD int udp_peek | ARGS ((udp_fd_t *)) |
| FORWARD void udp_ip_arrived | ARGS ((int port, acc_t *pack, size_t pack_size)) |
| FORWARD void reply_thr_put | ARGS ((udp_fd_t *udp_fd, int reply, int for_ioctl)) |
| FORWARD int udp_setopt | ARGS ((udp_fd_t *udp_fd)) |
| FORWARD udpport_t find_unused_port | ARGS ((int fd)) |
| FORWARD int is_unused_port | ARGS ((Udpport_t port)) |
| FORWARD u16_t pack_oneCsum | ARGS ((acc_t *pack)) |
| FORWARD void udp_rd_enqueue | ARGS ((udp_fd_t *udp_fd, acc_t *pack, clock_t exp_tim)) |
| PUBLIC void | udp_prep () |
| PUBLIC void | udp_init () |
| PUBLIC int | udp_open (int port, int srfd, get_userdata_t get_userdata, put_userdata_t put_userdata, put_pkt_t put_pkt, select_res_t select_res) |
| PUBLIC int | udp_ioctl (int fd, ioreq_t req) |
| PUBLIC int | udp_read (int fd, size_t count) |
| PRIVATE void | udp_main (udp_port_t *udp_port) |
| PRIVATE int | udp_select (int fd, unsigned operations) |
| PRIVATE acc_t * | udp_get_data (int port, size_t offset, size_t count, int for_ioctl) |
| PRIVATE int | udp_put_data (int fd, size_t offset, acc_t *data, int for_ioctl) |
| PRIVATE int | udp_setopt (udp_fd_t *udp_fd) |
| PRIVATE udpport_t | find_unused_port (int fd) |
| PRIVATE void | reply_thr_put (udp_fd_t *udp_fd, int reply, int for_ioctl) |
| PRIVATE void | reply_thr_get (udp_fd_t *udp_fd, int reply, int for_ioctl) |
| PRIVATE int | is_unused_port (udpport_t port) |
| PRIVATE void | read_ip_packets (udp_port_t *udp_port) |
| PRIVATE int | udp_peek (udp_fd_t *udp_fd) |
| PRIVATE int | udp_sel_read (udp_fd_t *udp_fd) |
| PRIVATE int | udp_packet2user (udp_fd_t *udp_fd) |
| PRIVATE void | udp_ip_arrived (int port, acc_t *pack, size_t pack_size) |
| PUBLIC void | udp_close (int fd) |
| PUBLIC int | udp_write (int fd, size_t count) |
| PRIVATE void | restart_write_fd (udp_fd_t *udp_fd) |
| PRIVATE u16_t | pack_oneCsum (acc_t *pack) |
| PRIVATE void | udp_restart_write_port (udp_port_t *udp_port) |
| PUBLIC int | udp_cancel (int fd, int which_operation) |
| PRIVATE void | udp_buffree (int priority) |
| PRIVATE void | udp_rd_enqueue (udp_fd_t *udp_fd, acc_t *pack, clock_t exp_tim) |
| PRIVATE void | hash_fd (udp_fd_t *udp_fd) |
| PRIVATE void | unhash_fd (udp_fd_t *udp_fd) |
Variables | |
| PUBLIC udp_port_t * | udp_port_table |
| PUBLIC udp_fd_t | udp_fd_table [UDP_FD_NR] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 680 of file udp.c. References htons, is_unused_port(), and UDP_FD_NR. |
|
|
Definition at line 1589 of file udp.c. References hash(), nwio_udpopt::nwuo_locport, NWUO_LP_ANY, UDP_PORT_HASH_NR, udp_fd::uf_udpopt, udp_port::up_port_any, and udp_port::up_port_hash. |
|
|
Definition at line 732 of file udp.c. References FALSE, i, if(), udp_fd, UDP_FD_NR, and udp_fd_table. |
|
|
Definition at line 1386 of file udp.c. References assert, FALSE, length, oneC_sum(), and ptr2acc_data. Referenced by restart_write_fd(), and udp_ip_arrived(). |
|
|
Definition at line 749 of file udp.c. References assert, ip_read(), NW_OK, NW_SUSPEND, result, UDP_MAX_DATAGRAM, UPF_READ_IP, and UPF_READ_SP. |
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
|
|
Definition at line 1506 of file udp.c. References acc::acc_ext_link, bf_afree(), i, udp_fd, UDP_FD_NR, udp_fd_table, and UDP_PRI_FDBUFS_EXTRA. |
|
||||||||||||
|
Definition at line 1470 of file udp.c. References assert, DBLOCK, EINTR, FALSE, ip_panic, NULL, NW_OK, printf, reply_thr_get(), reply_thr_put(), SR_CANCEL_IOCTL, SR_CANCEL_READ, SR_CANCEL_WRITE, TRUE, udp_fd, udp_fd_table, UFF_IOCTL_IP, UFF_PEEK_IP, UFF_READ_IP, and UFF_WRITE_IP. |
|
|
Definition at line 1165 of file udp.c. References acc::acc_ext_link, assert, bf_afree(), NULL, udp_fd, udp_fd_table, UFF_EMPTY, UFF_INUSE, and unhash_fd(). |
|
||||||||||||||||||||
|
Definition at line 327 of file udp.c. References assert, bf_afree(), bf_cut(), bf_memreq(), FALSE, int(), IPPROTO_UDP, NULL, NWIO_COPY, NWIO_EN_BROAD, NWIO_EN_LOC, NWIO_HDR_O_ANY, NWIO_PROTOSPEC, NWIO_REMANY, NWIO_RWDATALL, printf, ptr2acc_data, reply_thr_get(), result, udp_fd, udp_main(), udp_restart_write_port(), UFF_WRITE_IP, udp_port::up_flags, udp_port::up_state, udp_port::up_wr_pack, udp_port::up_write_fd, UPF_MORE2WRITE, UPF_SUSPEND, UPF_WRITE_IP, UPF_WRITE_SP, UPS_ERROR, UPS_GETCONF, UPS_MAIN, and UPS_SETPROTO. Referenced by udp_main(). |
|
|
Definition at line 60 of file udp.c. References assert, BUF_S, i, j, NULL, udp_fd, UDP_FD_NR, UDP_HDR_SIZE, UDP_IO_HDR_SIZE, and UFF_EMPTY. Referenced by nw_init(). |
|
||||||||||||
|
Definition at line 144 of file udp.c. References acc::acc_length, assert, bf_memreq(), EBADIOCTL, NW_OK, NW_SUSPEND, NWIOGUDPOPT, NWIOSUDPOPT, NWIOUDPPEEK, ptr2acc_data, reply_thr_get(), reply_thr_put(), result, TRUE, udp_fd, udp_peek(), udp_setopt(), UFF_INUSE, UFF_IOCTL_IP, udp_port::up_state, and UPS_MAIN. Referenced by udp_main(). |
|
||||||||||||||||
|
|
Definition at line 228 of file udp.c. References DBLOCK, i, if(), ip_ioctl(), ip_open(), ip_panic, NW_SUSPEND, NWIOGIPCONF, NWIOSIPOPT, printf, read_ip_packets(), result, udp_fd, UDP_FD_NR, udp_get_data(), udp_ioctl(), udp_ip_arrived(), udp_put_data(), UFF_INUSE, UFF_IOCTL_IP, UPF_SUSPEND, UPS_EMPTY, UPS_ERROR, UPS_GETCONF, UPS_MAIN, and UPS_SETPROTO. Referenced by udp_get_data(), and udp_put_data(). |
|
||||||||||||||||||||||||||||
|
Definition at line 107 of file udp.c. References DBLOCK, EAGAIN, i, printf, UDP_FD_NR, and UFF_INUSE. |
|
|
Definition at line 836 of file udp.c. References acc::acc_ext_link, acc::acc_length, assert, bf_afree(), bf_bufsize(), bf_cut(), bf_packIffLess(), EPACKSIZE, FALSE, hdr, NTOHS, NWUO_RWDATONLY, ptr2acc_data, result, size, UDP_IO_HDR_SIZE, UFF_READ_IP, and udp_io_hdr::uih_ip_opt_len. Referenced by udp_read(). |
|
|
Definition at line 769 of file udp.c. References acc::acc_ext_link, assert, bf_afree(), bf_cut(), EBADMODE, get_time(), NULL, NW_OK, NW_SUSPEND, reply_thr_put(), result, TRUE, UFF_IOCTL_IP, and UFF_PEEK_IP. Referenced by udp_ioctl(). |
|
|
Definition at line 55 of file udp.c. References alloc(), and udp_conf_nr. Referenced by nw_conf(). |
|
||||||||||||||||||||
|
Definition at line 413 of file udp.c. References assert, bf_afree(), bf_bufsize(), bf_packIffLess(), compare, data, int(), ip_panic, NW_OK, NWIC_IPADDR_SET, ptr2acc_data, read_ip_packets(), result, udp_ip_arrived(), udp_main(), udp_port::up_flags, udp_port::up_ipaddr, udp_port::up_state, UPF_READ_IP, UPF_READ_SP, UPF_SUSPEND, UPS_ERROR, UPS_GETCONF, and UPS_MAIN. Referenced by udp_main(). |
|
||||||||||||||||
|
Definition at line 1541 of file udp.c. References acc::acc_ext_link, acc::acc_linkC, assert, bf_afree(), bf_cut(), bf_dupacc(), NULL, printf, result, SR_SELECT_READ, TRUE, UFF_IOCTL_IP, UFF_PEEK_IP, and UFF_SEL_READ. |
|
||||||||||||
|
Definition at line 195 of file udp.c. References acc::acc_ext_link, bf_afree(), EBADMODE, FALSE, get_time(), NULL, NW_OK, NW_SUSPEND, reply_thr_put(), udp_fd, udp_packet2user(), UFF_OPTSET, and UFF_READ_IP. |
|
|
Definition at line 1434 of file udp.c. References assert, i, restart_write_fd(), udp_fd, UDP_FD_NR, udp_fd_table, UFF_INUSE, UFF_WRITE_IP, UPF_MORE2WRITE, UPF_WRITE_IP, and UPF_WRITE_SP. Referenced by udp_get_data(). |
|
|
Definition at line 810 of file udp.c. References acc::acc_ext_link, bf_afree(), get_time(), NULL, and result. Referenced by udp_select(). |
|
||||||||||||
|
Definition at line 295 of file udp.c. References assert, i, printf, SR_SELECT_EXCEPTION, SR_SELECT_POLL, SR_SELECT_READ, SR_SELECT_WRITE, udp_fd, udp_sel_read(), UFF_INUSE, and UFF_SEL_READ. |
|
|
Definition at line 482 of file udp.c. References assert, bf_afree(), bf_packIffLess(), data, DBLOCK, EADDRINUSE, EBADMODE, EFAULT, find_unused_port(), flags, i, if(), long(), NW_OK, NWUO_ACC_MASK, NWUO_BROAD_MASK, NWUO_EN_IPOPT, nwio_udpopt::nwuo_flags, NWUO_IPOPT_MASK, NWUO_LOCADDR_MASK, nwio_udpopt::nwuo_locport, NWUO_LOCPORT_MASK, NWUO_LP_ANY, NWUO_LP_SEL, NWUO_LP_SET, NWUO_RA_ANY, nwio_udpopt::nwuo_remaddr, NWUO_REMADDR_MASK, nwio_udpopt::nwuo_remport, NWUO_REMPORT_MASK, NWUO_RP_ANY, NWUO_RW_MASK, NWUO_RWDATONLY, printf, ptr2acc_data, reply_thr_get(), TRUE, UDP_FD_NR, udp_fd::uf_flags, udp_fd::uf_port, udp_fd::uf_udpopt, and UFF_INUSE. Referenced by udp_ioctl(). |
|
||||||||||||
|
Definition at line 1189 of file udp.c. References assert, DBLOCK, EBADMODE, FALSE, NW_OK, NW_SUSPEND, printf, reply_thr_get(), restart_write_fd(), udp_fd, udp_fd_table, and UFF_WRITE_IP. |
|
|
Definition at line 1613 of file udp.c. References hash(), NULL, nwio_udpopt::nwuo_locport, NWUO_LP_ANY, UDP_PORT_HASH_NR, udp_fd::uf_port_next, udp_fd::uf_udpopt, udp_port::up_port_any, and udp_port::up_port_hash. |
|
|
|
|
|
|
1.4.6