comparison mgw/udpsink.c @ 32:b3f74df7b808

beginning of themwi-mgw
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 09 Jul 2022 22:51:44 -0800
parents
children
comparison
equal deleted inserted replaced
31:08d7794cdd0a 32:b3f74df7b808
1 /*
2 * There are times when we hold open some UDP sockets, but can't do
3 * anything with incoming packets other than discard them. This
4 * situation holds for dummy one-sided endpoints, for gateway
5 * endpoints that haven't been fully connected yet, and for all RTCP
6 * packets at the moment.
7 *
8 * In this module we implement the generic UDP "black hole" sink.
9 */
10
11 #include <sys/types.h>
12 #include <sys/socket.h>
13 #include <netinet/in.h>
14 #include <stdio.h>
15 #include <stdlib.h>
16
17 void
18 udp_sink_rcvr(fd)
19 {
20 u_char buf[512];
21
22 recv(fd, buf, sizeof buf, 0);
23 }