FreeCalypso > hg > themwi-system-sw
diff mgw/struct.h @ 32:b3f74df7b808
beginning of themwi-mgw
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 09 Jul 2022 22:51:44 -0800 |
parents | |
children | f280328e7e2e |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mgw/struct.h Sat Jul 09 22:51:44 2022 -0800 @@ -0,0 +1,36 @@ +/* + * This header file defines internal data structures for themwi-mgw. + */ + +struct bind_range_cfg { + struct in_addr bind_ip; + unsigned port_range_start; + unsigned port_range_end; + unsigned port_next; + unsigned port_tries; +}; + +struct rtp_one_end { + int rtp_fd; + int rtcp_fd; + struct sockaddr_in bound_addr; + struct sockaddr_in remote_addr; +}; + +struct endpoint { + unsigned ep_type; + struct rtp_one_end rtp_gsm; + struct rtp_one_end rtp_pstn; + unsigned gsm_payload_type; + unsigned gsm_payload_msg_type; + unsigned pstn_payload_type; + unsigned fwd_mode; + /* linked list management */ + unsigned ep_id; + struct endpoint *next; +}; + +struct ctrl_conn { + struct endpoint *endp_list; + unsigned next_ep_id; +};