From 6bbe1bdd4b47d5c4e28383175d9882a01a515fbc Mon Sep 17 00:00:00 2001 From: Maksym Sobolyev Date: Mon, 26 Jan 2026 15:21:25 -0800 Subject: [PATCH 1/7] Allow pidfile at /dev/null. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 582edf89b..28658a316 100644 --- a/src/main.c +++ b/src/main.c @@ -1136,7 +1136,7 @@ _rtpp_main(int argc, const char * const *argv) } } - if (cfsp->ropts.no_pid == 0) { + if (cfsp->ropts.no_pid == 0 && strcmp(cfsp->pid_file, "/dev/null") != 0) { pid_fd = open(cfsp->pid_file, O_WRONLY | O_CREAT, DEFFILEMODE); if (pid_fd < 0) { RTPP_ELOG(cfsp->glog, RTPP_LOG_ERR, "can't open pidfile for writing"); From 69526fd72477370da7f9e9abb376a288749d9b47 Mon Sep 17 00:00:00 2001 From: Maksym Sobolyev Date: Mon, 26 Jan 2026 16:25:27 -0800 Subject: [PATCH 2/7] Use atomic ops to reduce amount of locking/unlocking needed in the critical (packet forwarding) path. --- src/rtpp_netaddr.c | 34 ++++++++++++++++++++++------------ src/rtpp_stream.c | 11 ++++++----- src/rtpp_ttl.c | 42 ++++++++++++++++-------------------------- 3 files changed, 44 insertions(+), 43 deletions(-) diff --git a/src/rtpp_netaddr.c b/src/rtpp_netaddr.c index be6c5607e..bb81fdfd7 100644 --- a/src/rtpp_netaddr.c +++ b/src/rtpp_netaddr.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "rtpp_types.h" #include "rtpp_codeptr.h" @@ -45,7 +46,7 @@ struct rtpp_netaddr_priv { struct rtpp_netaddr pub; struct sockaddr_storage sas; - socklen_t rlen; + _Atomic(socklen_t) rlen; pthread_mutex_t lock; }; @@ -84,6 +85,7 @@ rtpp_netaddr_ctor(void) if (pthread_mutex_init(&pvt->lock, NULL) != 0) { goto e1; } + atomic_init(&pvt->rlen, 0); PUBINST_FININIT(&pvt->pub, pvt, rtpp_netaddr_dtor); return ((&pvt->pub)); @@ -103,7 +105,7 @@ rtpp_netaddr_set(struct rtpp_netaddr *self, const struct sockaddr *addr, size_t pthread_mutex_lock(&pvt->lock); memcpy(&pvt->sas, addr, alen); - pvt->rlen = alen; + atomic_store_explicit(&pvt->rlen, alen, memory_order_relaxed); pthread_mutex_unlock(&pvt->lock); } @@ -123,9 +125,7 @@ rtpp_netaddr_isempty(struct rtpp_netaddr *self) RTPP_DBG_ASSERT(self != NULL); PUB2PVT(self, pvt); - pthread_mutex_lock(&pvt->lock); - rval = (pvt->rlen == 0); - pthread_mutex_unlock(&pvt->lock); + rval = (atomic_load_explicit(&pvt->rlen, memory_order_relaxed) == 0); return (rval); } @@ -134,11 +134,13 @@ rtpp_netaddr_cmp(struct rtpp_netaddr *self, const struct sockaddr *sap, size_t s { struct rtpp_netaddr_priv *pvt; int rval; + socklen_t rlen; PUB2PVT(self, pvt); RTPP_DBG_ASSERT(salen <= sizeof(pvt->sas)); pthread_mutex_lock(&pvt->lock); - if (salen != pvt->rlen) { + rlen = atomic_load_explicit(&pvt->rlen, memory_order_relaxed); + if (salen != rlen) { rval = -1; goto unlock_and_return; } @@ -153,10 +155,12 @@ rtpp_netaddr_isaddrseq(struct rtpp_netaddr *self, const struct sockaddr *sap) { struct rtpp_netaddr_priv *pvt; int rval; + socklen_t rlen; PUB2PVT(self, pvt); pthread_mutex_lock(&pvt->lock); - RTPP_DBG_ASSERT(pvt->rlen > 0); + rlen = atomic_load_explicit(&pvt->rlen, memory_order_relaxed); + RTPP_DBG_ASSERT(rlen > 0); rval = isaddrseq(sstosa(&pvt->sas), sap); pthread_mutex_unlock(&pvt->lock); return (rval); @@ -167,10 +171,12 @@ rtpp_netaddr_cmphost(struct rtpp_netaddr *self, const struct sockaddr *sap) { struct rtpp_netaddr_priv *pvt; int rval; + socklen_t rlen; PUB2PVT(self, pvt); pthread_mutex_lock(&pvt->lock); - RTPP_DBG_ASSERT(pvt->rlen > 0); + rlen = atomic_load_explicit(&pvt->rlen, memory_order_relaxed); + RTPP_DBG_ASSERT(rlen > 0); rval = ishostseq(sstosa(&pvt->sas), sap); pthread_mutex_unlock(&pvt->lock); return (rval); @@ -190,13 +196,15 @@ static size_t rtpp_netaddr_get(struct rtpp_netaddr *self, struct sockaddr *sap, size_t salen) { struct rtpp_netaddr_priv *pvt; + socklen_t rlen; PUB2PVT(self, pvt); pthread_mutex_lock(&pvt->lock); - RTPP_DBG_ASSERT((salen >= pvt->rlen) && (pvt->rlen > 0)); - memcpy(sap, &pvt->sas, pvt->rlen); + rlen = atomic_load_explicit(&pvt->rlen, memory_order_relaxed); + RTPP_DBG_ASSERT((salen >= rlen) && (rlen > 0)); + memcpy(sap, &pvt->sas, rlen); pthread_mutex_unlock(&pvt->lock); - return (pvt->rlen); + return (rlen); } static size_t @@ -205,10 +213,12 @@ rtpp_netaddr_sip_print(struct rtpp_netaddr *self, char *buf, size_t blen, { char *rval; struct rtpp_netaddr_priv *pvt; + socklen_t rlen; PUB2PVT(self, pvt); pthread_mutex_lock(&pvt->lock); - RTPP_DBG_ASSERT(pvt->rlen > 0); + rlen = atomic_load_explicit(&pvt->rlen, memory_order_relaxed); + RTPP_DBG_ASSERT(rlen > 0); rval = addrport2char_r(sstosa(&pvt->sas), buf, blen, portsep); pthread_mutex_unlock(&pvt->lock); RTPP_DBG_ASSERT(rval != NULL); diff --git a/src/rtpp_stream.c b/src/rtpp_stream.c index 2b2b2084f..1fd0ebf14 100644 --- a/src/rtpp_stream.c +++ b/src/rtpp_stream.c @@ -120,6 +120,7 @@ struct rtpp_stream_priv struct rtpp_acct_hold hld_stat; /* Descriptor */ struct rtpp_socket *fd; + _Atomic(int) _fd_set; /* Remote source address */ struct rtpp_netaddr *rem_addr; int npkts_resizer_in_idx; @@ -331,6 +332,7 @@ rtpp_stream_ctor(const struct r_stream_ctor_args *ap) pvt->pmod_data.nmodules = nmodules; pvt->pub.pmod_datap = &(pvt->pmod_data); pvt->pub.laddr = sap->lia[ap->side]; + atomic_init(&pvt->_fd_set, 0); PUBINST_FININIT(&pvt->pub, pvt, rtpp_stream_dtor); return (&pvt->pub); @@ -913,6 +915,7 @@ rtpp_stream_set_skt(struct rtpp_stream *self, struct rtpp_socket *new_skt) RTPP_DBG_ASSERT(pvt->fd != NULL); RTPP_OBJ_DECREF(pvt->fd); pvt->fd = NULL; + atomic_store_explicit(&pvt->_fd_set, 0, memory_order_relaxed); pthread_mutex_unlock(&pvt->lock); return; } @@ -920,6 +923,7 @@ rtpp_stream_set_skt(struct rtpp_stream *self, struct rtpp_socket *new_skt) CALL_SMETHOD(new_skt, set_stuid, self->stuid); pvt->fd = new_skt; RTPP_OBJ_INCREF(pvt->fd); + atomic_store_explicit(&pvt->_fd_set, 1, memory_order_relaxed); if (pvt->rtps.inact != 0 && !CALL_SMETHOD(pvt->rem_addr, isempty)) { _rtpp_stream_plr_start(pvt, getdtime()); } @@ -957,6 +961,7 @@ rtpp_stream_update_skt(struct rtpp_stream *self, struct rtpp_socket *new_skt) CALL_SMETHOD(new_skt, set_stuid, self->stuid); pvt->fd = new_skt; RTPP_OBJ_INCREF(pvt->fd); + atomic_store_explicit(&pvt->_fd_set, 1, memory_order_relaxed); if (pvt->rtps.inact != 0 && !CALL_SMETHOD(pvt->rem_addr, isempty)) { _rtpp_stream_plr_start(pvt, getdtime()); } @@ -1010,16 +1015,12 @@ rtpp_stream_issendable(struct rtpp_stream *self) struct rtpp_stream_priv *pvt; PUB2PVT(self, pvt); - pthread_mutex_lock(&pvt->lock); if (CALL_SMETHOD(pvt->rem_addr, isempty)) { - pthread_mutex_unlock(&pvt->lock); return (0); } - if (pvt->fd == NULL) { - pthread_mutex_unlock(&pvt->lock); + if (atomic_load_explicit(&pvt->_fd_set, memory_order_relaxed) == 0) { return (0); } - pthread_mutex_unlock(&pvt->lock); return (1); } diff --git a/src/rtpp_ttl.c b/src/rtpp_ttl.c index e7fe5f79f..b90bb0d3e 100644 --- a/src/rtpp_ttl.c +++ b/src/rtpp_ttl.c @@ -26,9 +26,9 @@ * */ -#include #include #include +#include #include "rtpp_types.h" #include "rtpp_mallocs.h" @@ -39,9 +39,8 @@ struct rtpp_ttl_priv { struct rtpp_ttl pub; - int max_ttl; - int ttl; - pthread_mutex_t lock; + _Atomic(int) max_ttl; + _Atomic(int) ttl; }; static void rtpp_ttl_dtor(struct rtpp_ttl_priv *); @@ -66,15 +65,11 @@ rtpp_ttl_ctor(int max_ttl) if (pvt == NULL) { goto e0; } - if (pthread_mutex_init(&pvt->lock, NULL) != 0) { - goto e1; - } - pvt->ttl = pvt->max_ttl = max_ttl; + atomic_init(&pvt->max_ttl, max_ttl); + atomic_init(&pvt->ttl, max_ttl); PUBINST_FININIT(&pvt->pub, pvt, rtpp_ttl_dtor); return ((&pvt->pub)); -e1: - RTPP_OBJ_DECREF(&(pvt->pub)); e0: return (NULL); } @@ -84,18 +79,17 @@ rtpp_ttl_dtor(struct rtpp_ttl_priv *pvt) { rtpp_ttl_fin(&(pvt->pub)); - pthread_mutex_destroy(&pvt->lock); } static void rtpp_ttl_reset(struct rtpp_ttl *self) { struct rtpp_ttl_priv *pvt; + int max_ttl; PUB2PVT(self, pvt); - pthread_mutex_lock(&pvt->lock); - pvt->ttl = pvt->max_ttl; - pthread_mutex_unlock(&pvt->lock); + max_ttl = atomic_load_explicit(&pvt->max_ttl, memory_order_relaxed); + atomic_store_explicit(&pvt->ttl, max_ttl, memory_order_relaxed); } static void @@ -104,10 +98,8 @@ rtpp_ttl_reset_with(struct rtpp_ttl *self, int max_ttl) struct rtpp_ttl_priv *pvt; PUB2PVT(self, pvt); - pthread_mutex_lock(&pvt->lock); - pvt->ttl = max_ttl; - pvt->max_ttl = max_ttl; - pthread_mutex_unlock(&pvt->lock); + atomic_store_explicit(&pvt->max_ttl, max_ttl, memory_order_relaxed); + atomic_store_explicit(&pvt->ttl, max_ttl, memory_order_relaxed); } static int @@ -117,9 +109,9 @@ rtpp_ttl_get_remaining(struct rtpp_ttl *self) int rval; PUB2PVT(self, pvt); - pthread_mutex_lock(&pvt->lock); - rval = pvt->ttl; - pthread_mutex_unlock(&pvt->lock); + rval = atomic_load_explicit(&pvt->ttl, memory_order_relaxed); + if (rval < 0) + rval = 0; return (rval); } @@ -130,10 +122,8 @@ rtpp_ttl_decr(struct rtpp_ttl *self) int rval; PUB2PVT(self, pvt); - pthread_mutex_lock(&pvt->lock); - rval = pvt->ttl; - if (pvt->ttl > 0) - pvt->ttl--; - pthread_mutex_unlock(&pvt->lock); + rval = atomic_fetch_sub_explicit(&pvt->ttl, 1, memory_order_relaxed); + if (rval < 0) + rval = 0; return (rval); } From 71f952f064240c5ae1a377312e3007c397370303 Mon Sep 17 00:00:00 2001 From: Maksym Sobolyev Date: Mon, 26 Jan 2026 13:58:03 -0800 Subject: [PATCH 3/7] Extend RPTL runner to allow rtpproxy instances to be started automatically and connected via socket pair. Convert socket entries into ordinary operations allowing variables to be set to control it. Add missing usage(). --- python/RPTL/rptl_run.py | 169 ++++++++++++++++++++++++++++++---------- 1 file changed, 130 insertions(+), 39 deletions(-) diff --git a/python/RPTL/rptl_run.py b/python/RPTL/rptl_run.py index 80a7c4344..a3b448682 100644 --- a/python/RPTL/rptl_run.py +++ b/python/RPTL/rptl_run.py @@ -3,12 +3,15 @@ from parsimonious.grammar import Grammar from parsimonious.nodes import Node, NodeVisitor +from sippy.Rtp_proxy.Client.stream import Rtp_proxy_client_stream +from sippy.Rtp_proxy.Client.Worker.internal import RTPPLWorker_internal # Define the grammar for the DSL syntax grammar = Grammar( r""" - program = (socket ws)+ (command ws?)+ - socket = "socket" ws name ":" ws address (ws arr ws logfile)? + program = ws? stmt (ws stmt)* ws? + stmt = socket / command + socket = "socket" ws name ":" ws address (ws1 socket_params)? (ws1 arr ws logfile)? command = name ":" ws action (ws output_spec)? name = ~r"[.]?\w+" output_spec = arr ws (trans_spec / var_name) @@ -16,10 +19,13 @@ trans_spec = func_name obra func_arg (comm ws func_arg)* cbra func_arg = ~"[^,)]+" func_name = ~"\w+" + socket_params = param (ws1 param)* + param = ~r"(?!->)\S+" address = ~r"\S+" logfile = ~r"\S+" action = ~r"(.(?!->))*" ws = ~r"\s*" + ws1 = ~r"[ \t]+" arr = "->" comm = "," obra = "(" @@ -31,11 +37,17 @@ class CommandRunner(): rc = None spath: str outfile: str + proc = None - def __init__(self, socket_name, outfile): + def __init__(self, socket_name, outfile, params, variables): from sippy.Rtp_proxy.client import Rtp_proxy_client - self.rc = Rtp_proxy_client({'_sip_address': '127.0.0.1'}, spath = socket_name, - nworkers = 4, no_version_check = True) + if socket_name == 'stdio:': + rtpproxy_bin = variables.get('RTPPROXY_BIN', 'rtpproxy') + self.rc = StdioRtpProxyClient(params, rtpproxy_bin = rtpproxy_bin) + self.proc = self.rc.proc + else: + self.rc = Rtp_proxy_client({'_sip_address': '127.0.0.1'}, spath = socket_name, + nworkers = 4, no_version_check = True) self.spath = socket_name self.outfile = outfile if outfile: @@ -47,6 +59,44 @@ def log(self, response): self._outfd.write(response + '\n') self._outfd.flush() + def shutdown(self): + if self.rc is None: + return + if hasattr(self.rc, 'shutdown'): + self.rc.shutdown() + self.rc = None + +class StdioRtpProxyClient(Rtp_proxy_client_stream): + def __init__(self, extra_args, nworkers = 1, rtpproxy_bin = None): + import socket + import subprocess + if rtpproxy_bin is None: + rtpproxy_bin = 'rtpproxy' + self.worker_class = RTPPLWorker_internal + cmd = [rtpproxy_bin, '-f', '-s', 'stdio:'] + list(extra_args) + parent_sock, child_sock = socket.socketpair() + self._stdio_sock = parent_sock + self.proc = subprocess.Popen(cmd, stdin = child_sock, stdout = child_sock, + stderr = None, close_fds = True) + child_sock.close() + super().__init__({'_sip_address': '127.0.0.1'}, address = parent_sock, + bind_address = None, nworkers = nworkers, family = socket.AF_UNIX) + + def shutdown(self): + super().shutdown() + if self._stdio_sock is not None: + self._stdio_sock.close() + self._stdio_sock = None + if self.proc is None: + return + if self.proc.poll() is None: + self.proc.terminate() + try: + self.proc.wait(timeout = 2.0) + except Exception: + self.proc.kill() + self.proc = None + class TransFunction(): name: str args: list @@ -90,8 +140,8 @@ class ScriptRunner(): internal_ops: dict ex_info: ExceptionInfo = None - def __init__(self, sockets, commands): - self.sockets = sockets + def __init__(self, commands): + self.sockets = {} self.commands = commands self.variables = {} self.internal_ops = { @@ -102,12 +152,18 @@ def __init__(self, sockets, commands): self.issue_next_cmd() def issue_next_cmd(self): - if self.i_command == len(self.commands): - from sippy.Core.EventDispatcher import ED2 - ED2.breakLoop() - return - cmd = self.commands[self.i_command] - self.i_command += 1 + from sippy.Core.EventDispatcher import ED2 + while True: + if self.i_command == len(self.commands): + ED2.breakLoop() + return + cmd = self.commands[self.i_command] + self.i_command += 1 + if isinstance(cmd, SocketSpec): + self.sockets[cmd.name] = CommandRunner(cmd.address, cmd.outfile, + cmd.params, self.variables) + continue + break command = self.expand_vars(cmd.action) if cmd.socket_name.startswith('.'): self.internal_ops[cmd.socket_name](cmd, command) @@ -185,31 +241,55 @@ class Command(): action: str output_var: str = None +class SocketSpec(): + name: str + address: str + params: list + outfile: str + + def __init__(self, name, address, params, outfile): + self.name = name + self.address = address + self.params = params + self.outfile = outfile + # Define a class to visit the nodes in the parse tree class DSLVisitor(NodeVisitor): def __init__(self): - self.sockets = {} self.rules = [] def visit_socket(self, node, children): - _, _, name, _, _, address, rest = children + _, _, name, _, _, address, params_group, log_group = children + params = [] + if not isinstance(params_group, Node) and len(params_group) > 0: + params = self._find_params(params_group) or [] outfile = None - if not isinstance(rest, Node) and len(rest) > 0: - assert(len(rest) == 1) - _, _, _, _outfile = rest[0] - outfile = _outfile.text - self.sockets[name.text] = CommandRunner(address.text, outfile) - - def visit_command_old(self, node, children): - cmd = Command() - socket_name, _, _, action, rest = children - cmd.socket_name = socket_name.text - cmd.action = action.text - if not isinstance(rest, Node) and len(rest) > 0: - assert(len(rest) == 1) - _, _, _, var_name = rest[0] - cmd.output_var = var_name.text - self.rules.append(cmd) + if not isinstance(log_group, Node) and len(log_group) > 0: + outfile = self._find_logfile(log_group) + self.rules.append(SocketSpec(name.text, address.text, params, outfile)) + + def visit_socket_params(self, node, children): + return node.text.split() + + def _find_params(self, obj): + if isinstance(obj, list): + if obj and all(isinstance(x, str) for x in obj): + return obj + for item in obj: + found = self._find_params(item) + if found is not None: + return found + return None + + def _find_logfile(self, obj): + if isinstance(obj, Node) and obj.expr_name == 'logfile': + return obj.text + if isinstance(obj, list): + for item in obj: + found = self._find_logfile(item) + if found is not None: + return found + return None def visit_command(self, node, children): cmd = Command() @@ -252,13 +332,13 @@ def parse_dsl(dsl_code): def execute_dsl(parse_tree): visitor = DSLVisitor() visitor.visit(parse_tree) - return visitor.sockets, visitor.rules + return visitor.rules test_dsl = """socket ALICE: /tmp/abc.sock socket BOB: udp:192.168.221.1:38282 socket CHARLIE: tcp:127.0.0.1:32323 -> CHARLIE.rout -.set: --CALLID-- -> CALLID -.set: 0.01 -> ICD +.eval: --CALLID-- -> CALLID +.eval: 0.01 -> ICD ALICE: U %%CALLID%% 127.0.0.1 12345 from_tag_1 -> PORT ALICE: U %%CALLID%% 127.0.0.1 12345 from_tag_1 -> str_split(aa, PORT, FOO) .sleep: %%ICD%% @@ -274,11 +354,16 @@ def execute_dsl(parse_tree): #ALICE: U %%CALLID%% 127.0.0.1 12345 from_tag_1 -| str_split(aa, PORT, FOO) +def usage(rc = 0): + sys.stderr.write('usage: rptl_run.py [-s script.rptl] [-S sippy_path]\n') + sys.stderr.flush() + sys.exit(rc) + if __name__ == '__main__': try: - opts, args = getopt.getopt(sys.argv[1:], 's:S:') + opts, args = getopt.getopt(sys.argv[1:], 's:S:h') except getopt.GetoptError: - usage() + usage(2) dsl_text = test_dsl sippy_path = None @@ -289,20 +374,26 @@ def execute_dsl(parse_tree): if o == '-S': sippy_path = a.strip() continue + if o == '-h': + usage(0) if sippy_path != None: sys.path.insert(0, sippy_path) tree = parse_dsl(dsl_text) #print(tree) - ss, rs = execute_dsl(tree) + rs = execute_dsl(tree) #for r in rs: # print(F'socket = "socket = {ss[r.socket_name]}", action = "{r.action}", output_var = "{r.output_var}"') from sippy.Core.EventDispatcher import ED2 - srun = ScriptRunner(ss, rs) - ED2.loop() + srun = ScriptRunner(rs) + try: + ED2.loop() + finally: + for socket in srun.sockets.values(): + socket.shutdown() if srun.ex_info: m = F'Failed action: "{srun.ex_info.cmd.action}"\n\texpanded: "{srun.ex_info.command}"\n' sys.stderr.write(m) From b990ad8e354a693ae2ec413bb49a704a5ebbb9ce Mon Sep 17 00:00:00 2001 From: Maksym Sobolyev Date: Sun, 23 May 2021 10:02:40 -0700 Subject: [PATCH 4/7] Add "S[r] ttl=XXX" and "S[r] tos=XXX" sub-commands. If ttl_mode != TTL_INDEPENDENT set ttl on both legs regardless of the direction. PR: #59 --- modules/dtls_gw/rtpp_dtls_gw.c | 3 +- src/Makefile.am | 3 +- src/commands/rpcpv1_copy.c | 7 +- src/commands/rpcpv1_query.c | 3 +- src/commands/rpcpv1_ul.c | 12 ++- src/commands/rpcpv1_ul_subc.c | 15 ++- src/commands/rpcpv1_ul_subc_set.c | 156 ++++++++++++++++++++++++++++++ src/commands/rpcpv1_ul_subc_set.h | 50 ++++++++++ src/commands/rpcpv1_ver.c | 1 + src/rtpp_command.c | 10 +- src/rtpp_command.h | 2 +- src/rtpp_command_sub.h | 2 + src/rtpp_record.h | 1 + src/rtpp_session.c | 2 +- src/rtpp_stream.c | 2 + src/rtpp_stream.h | 3 + src/rtpp_util.c | 25 +++++ src/rtpp_util.h | 2 + 18 files changed, 282 insertions(+), 17 deletions(-) create mode 100644 src/commands/rpcpv1_ul_subc_set.c create mode 100644 src/commands/rpcpv1_ul_subc_set.h diff --git a/modules/dtls_gw/rtpp_dtls_gw.c b/modules/dtls_gw/rtpp_dtls_gw.c index 5145bb241..84f5ed912 100644 --- a/modules/dtls_gw/rtpp_dtls_gw.c +++ b/modules/dtls_gw/rtpp_dtls_gw.c @@ -248,7 +248,8 @@ rtpp_dtls_gw_setup_sender(struct rtpp_module_priv *pvt, abort(); } - if (rtpp_create_listener(pvt->cfsp, dtls_strmp->laddr, &lport, fds) == -1) + if (rtpp_create_listener(pvt->cfsp, dtls_strmp->laddr, &lport, fds, + dtls_strmp->tos) == -1) return (-1); CALL_SMETHOD(pvt->cfsp->sessinfo, append, spa, sidx, fds); CALL_METHOD(pvt->cfsp->rtpp_proc_cf, nudge); diff --git a/src/Makefile.am b/src/Makefile.am index 64ab67a52..b43170b32 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -75,7 +75,8 @@ BASE_SOURCES=main.c rtp.h rtpp_server.c \ $(CMDSRCDIR)/rpcpv1_norecord.c $(CMDSRCDIR)/rpcpv1_norecord.h \ $(CMDSRCDIR)/rpcpv1_ul_subc.c $(CMDSRCDIR)/rpcpv1_ul_subc.h \ $(RTPP_AUTOSRC_SOURCES) rtpp_epoll.c rtpp_str.c rtpp_str.h \ - rtpp_sbuf.c rtpp_sbuf.h rtpp_refproxy.c rtpp_command_reply.c + rtpp_sbuf.c rtpp_sbuf.h rtpp_refproxy.c rtpp_command_reply.c \ + $(CMDSRCDIR)/rpcpv1_ul_subc_set.c $(CMDSRCDIR)/rpcpv1_ul_subc_set.h BASE_SOURCES+=$(ADV_DIR)/packet_observer.h $(ADV_DIR)/pproc_manager.c \ $(ADV_DIR)/pproc_manager.h BASE_SOURCES+=rtpp_modman.c rtpp_module_if_static.c rtpp_module_if_static.h diff --git a/src/commands/rpcpv1_copy.c b/src/commands/rpcpv1_copy.c index d23832124..6e4289059 100644 --- a/src/commands/rpcpv1_copy.c +++ b/src/commands/rpcpv1_copy.c @@ -80,7 +80,7 @@ get_args4remote(const struct rtpp_cfg *cfsp, const char *rname, struct rtpp_log if (laddr == NULL) return (-1); int lport; - if (rtpp_create_listener(cfsp, laddr, &lport, fds) != 0) { + if (rtpp_create_listener(cfsp, laddr, &lport, fds, ap->tos) != 0) { RTPP_LOG(log, RTPP_LOG_ERR, "can't create listener"); return (-1); } @@ -97,7 +97,6 @@ handle_copy(const struct rtpp_cfg *cfsp, struct rtpp_command *cmd, struct rtpp_s int idx, const char *rname, const struct record_opts *rop) { int remote; - struct remote_copy_args rargs = {0}; remote = (rname != NULL && strncmp("udp:", rname, 4) == 0)? 1 : 0; @@ -134,9 +133,11 @@ handle_copy(const struct rtpp_cfg *cfsp, struct rtpp_command *cmd, struct rtpp_s } int rval = -1; - if (remote) + struct remote_copy_args rargs = {.tos = spa->rtp->stream[idx]->tos}; + if (remote) { if (get_args4remote(cfsp, rname, spa->log, &rargs) != 0) return (-1); + } if (spa->rtp->stream[idx]->rrc == NULL) { spa->rtp->stream[idx]->rrc = rtpp_record_ctor(cfsp, &rargs, spa, rname, idx, RECORD_RTP); diff --git a/src/commands/rpcpv1_query.c b/src/commands/rpcpv1_query.c index 89ca102e4..094b5c3f1 100644 --- a/src/commands/rpcpv1_query.c +++ b/src/commands/rpcpv1_query.c @@ -260,7 +260,8 @@ handle_query(const struct rtpp_cfg *cfsp, struct rtpp_command *cmd, .strmp_in = spp->stream[idx], .strmp_out = spp->stream[NOT(idx)], .subc_args = &(cmd->subc.args[i]), - .resp = &(cmd->subc.res[i]) + .resp = &(cmd->subc.res[i]), + .log = spp->log, }; rsc.resp->result = cmd->after_success[i].handler( &cmd->after_success[i].args, &rsc); diff --git a/src/commands/rpcpv1_ul.c b/src/commands/rpcpv1_ul.c index 1f1fa56dc..0319f17c5 100644 --- a/src/commands/rpcpv1_ul.c +++ b/src/commands/rpcpv1_ul.c @@ -448,6 +448,7 @@ rtpp_command_ul_handle(const struct rtpp_cfg *cfsp, struct rtpp_command *cmd, in struct rtpp_session *spa, *spb; struct rtpp_socket *fd; struct ul_opts *ulop; + int desired_tos; pidx = 1; lport = 0; @@ -466,6 +467,7 @@ rtpp_command_ul_handle(const struct rtpp_cfg *cfsp, struct rtpp_command *cmd, in if (sidx != -1) { RTPP_DBG_ASSERT(cmd->cca.op == UPDATE || cmd->cca.op == LOOKUP); spa = cmd->sp; + desired_tos = spa->rtp->stream[sidx]->tos; fd = CALL_SMETHOD(spa->rtp->stream[sidx], get_skt, HEREVAL); if (fd == NULL || ulop->new_port != 0) { if (ulop->local_addr != NULL) { @@ -473,7 +475,8 @@ rtpp_command_ul_handle(const struct rtpp_cfg *cfsp, struct rtpp_command *cmd, in } else if (ulop->new_port != 0 && ulop->lidx == -1 && spa->rtp->stream[sidx]->laddr != ulop->lia[0]) { spa->rtp->stream[sidx]->laddr = ulop->lia[0]; } - if (rtpp_create_listener(cfsp, spa->rtp->stream[sidx]->laddr, &lport, fds) == -1) { + if (rtpp_create_listener(cfsp, spa->rtp->stream[sidx]->laddr, &lport, fds, + desired_tos) == -1) { if (fd != NULL) RTPP_OBJ_DECREF(fd); RTPP_LOG(spa->log, RTPP_LOG_ERR, "can't create listener"); @@ -496,9 +499,9 @@ rtpp_command_ul_handle(const struct rtpp_cfg *cfsp, struct rtpp_command *cmd, in if (spa->complete == 0) { rtpp_command_get_stats(cmd)->nsess_complete.cnt++; CALL_SMETHOD(spa->rtp->stream[0]->ttl, reset_with, - cfsp->max_ttl); + spa->rtp->stream[0]->stream_ttl); CALL_SMETHOD(spa->rtp->stream[1]->ttl, reset_with, - cfsp->max_ttl); + spa->rtp->stream[1]->stream_ttl); } spa->complete = 1; } @@ -698,7 +701,8 @@ rtpp_command_ul_handle(const struct rtpp_cfg *cfsp, struct rtpp_command *cmd, in .strmp_in = spa->rtp->stream[pidx], .strmp_out = spa->rtp->stream[NOT(pidx)], .subc_args = &(cmd->subc.args[i]), - .resp = &(cmd->subc.res[i]) + .resp = &(cmd->subc.res[i]), + .log = spa->log, }; rsc.resp->result = cmd->after_success[i].handler( &cmd->after_success[i].args, &rsc); diff --git a/src/commands/rpcpv1_ul_subc.c b/src/commands/rpcpv1_ul_subc.c index b3f7dac78..d80a6286c 100644 --- a/src/commands/rpcpv1_ul_subc.c +++ b/src/commands/rpcpv1_ul_subc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2020 Sippy Software, Inc., http://www.sippysoft.com + * Copyright (c) 2006-2025 Sippy Software, Inc., http://www.sippysoft.com * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -45,6 +45,7 @@ #include "commands/rpcpv1_ul.h" #include "commands/rpcpv1_ul_subc.h" #include "commands/rpcpv1_delete.h" +#include "commands/rpcpv1_ul_subc_set.h" #if ENABLE_MODULE_IF static int @@ -72,6 +73,7 @@ rtpp_subcommand_ul_opts_parse(const struct rtpp_cfg *cfsp, struct rtpp_command * const struct rtpp_command_args *subc_args, struct after_success_h *asp) { struct delete_opts *dop; + struct rtpp_subcommand_set *sop; switch(subc_args->v[0].s[0]) { case 'M': @@ -98,6 +100,17 @@ rtpp_subcommand_ul_opts_parse(const struct rtpp_cfg *cfsp, struct rtpp_command * asp->handler = handle_delete_as_subc; break; + case 'S': + case 's': + if (subc_args->c != 2 || subc_args->v[0].len < 1 || subc_args->v[0].len > 2) + return (-1); + sop = handle_set_subc_parse(cfsp, &subc_args->v[0].s[1], &subc_args->v[1], asp); + if (sop == NULL) + return (-1); + asp->args.dyn = sop; + RTPP_OBJ_DTOR_ATTACH_OBJ(cmd, sop); + break; + default: return (-1); } diff --git a/src/commands/rpcpv1_ul_subc_set.c b/src/commands/rpcpv1_ul_subc_set.c new file mode 100644 index 000000000..3450a2689 --- /dev/null +++ b/src/commands/rpcpv1_ul_subc_set.c @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2025 Sippy Software, Inc., http://www.sippysoft.com + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +#include +#include +#include +#include + +#include "config.h" + +#include "rtpp_codeptr.h" +#include "rtpp_types.h" +#include "rtpp_refcnt.h" +#include "rtpp_log.h" +#include "rtpp_log_obj.h" +#include "rtpp_pipe.h" +#include "rtpp_socket.h" +#include "rtpp_session.h" +#include "rtpp_stream.h" +#include "rtpp_ttl.h" +#include "rtpp_command.h" +#include "rtpp_command_sub.h" +#include "rtpp_command_args.h" +#include "rtpp_command_private.h" +#include "rtpp_mallocs.h" +#include "rtpp_util.h" +#include "commands/rpcpv1_ul.h" +#include "commands/rpcpv1_ul_subc_set.h" + +static int +strmp_settos(const struct rtpp_subc_ctx *rscp, struct rtpp_stream *strmp, int val) +{ + if (strmp->laddr->sa_family != AF_INET) + return (-1); + struct rtpp_socket *fd = CALL_SMETHOD(strmp, get_skt, HEREVAL); + if (fd == NULL) + goto out; + int tres = CALL_SMETHOD(fd, settos, val); + RTPP_OBJ_DECREF(fd); + if (tres == -1) { + RTPP_ELOG(rscp->log, RTPP_LOG_ERR, "unable to set TOS to %d", val); + return (-1); + } +out: + strmp->tos = val; + return (0); +} + +static int +rtpp_subcommand_set_handler(const struct after_success_h_args *ashap, + const struct rtpp_subc_ctx *rscp) +{ + const struct rtpp_subcommand_set *tap; + struct rtpp_stream *strmp, *strmp1 = NULL; + + tap = (struct rtpp_subcommand_set *)ashap->dyn; + switch (tap->direction) { + case SET_FORWARD: + strmp = rscp->strmp_in; + strmp1 = rscp->strmp_out; + break; + + case SET_REVERSE: + strmp = rscp->strmp_out; + if (strmp == NULL) + return (-1); + strmp1 = rscp->strmp_in; + break; + + default: + abort(); + } + + switch (tap->param) { + case SET_PRM_TTL: + strmp->stream_ttl = tap->val; + if (strmp1 != NULL && strmp1->ttl == strmp->ttl) + strmp1->stream_ttl = tap->val; + CALL_SMETHOD(strmp->ttl, reset_with, tap->val); + break; + + case SET_PRM_TOS: + if (strmp_settos(rscp, strmp, tap->val) != 0) + return (-1); + struct rtpp_stream_pair rtcp = get_rtcp_pair(rscp->sessp, strmp); + if (rtcp.ret != 0 || rtcp.in == NULL) + break; + if (strmp_settos(rscp, rtcp.in, tap->val) != 0) + return (-1); + break; + + default: + abort(); + } + return (0); +} + +struct rtpp_subcommand_set * +handle_set_subc_parse(const struct rtpp_cfg *cfsp, const char *cp, + const rtpp_str_const_t *v, struct after_success_h *asp) +{ + struct rtpp_subcommand_set set_arg, *tap; + + if (cp[0] == 'r' || cp[0] == 'R') { + set_arg.direction = SET_REVERSE; + } else { + set_arg.direction = SET_FORWARD; + } + if (v->len < 5) + return (NULL); + if (memcmp(v->s, "ttl=", 4) == 0) { + set_arg.param = SET_PRM_TTL; + cp = v->s + 4; + } else if (memcmp(v->s, "tos=", 4) == 0) { + set_arg.param = SET_PRM_TOS; + cp = v->s + 4; + } else { + return (NULL); + } + if (atoi_safe(cp, &set_arg.val) != ATOI_OK) + return (NULL); + if (set_arg.val <= 0) + return (NULL); + tap = rtpp_rzmalloc(sizeof(set_arg), offsetof(struct rtpp_subcommand_set, rcnt)); + if (tap == NULL) + return (NULL); + tap->val = set_arg.val; + tap->direction = set_arg.direction; + tap->param = set_arg.param; + asp->handler = rtpp_subcommand_set_handler; + return (tap); +} diff --git a/src/commands/rpcpv1_ul_subc_set.h b/src/commands/rpcpv1_ul_subc_set.h new file mode 100644 index 000000000..a8385ca6d --- /dev/null +++ b/src/commands/rpcpv1_ul_subc_set.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2025 Sippy Software, Inc., http://www.sippysoft.com + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +struct rtpp_subc_ctx; +struct after_success_h_args; + +enum rtpp_subcommand_set_direction { + SET_FORWARD = 0, + SET_REVERSE = 1 +}; + +enum rtpp_subcommand_set_param { + SET_PRM_TTL, + SET_PRM_TOS, + SET_PRM_SSRC_IN, + SET_PRM_SSRC_OUT, +}; + +struct rtpp_subcommand_set { + struct rtpp_refcnt *rcnt; + int val; + enum rtpp_subcommand_set_param param; + enum rtpp_subcommand_set_direction direction; +}; + +struct rtpp_subcommand_set *handle_set_subc_parse(const struct rtpp_cfg *, const char *, + const rtpp_str_const_t *, struct after_success_h *); diff --git a/src/commands/rpcpv1_ver.c b/src/commands/rpcpv1_ver.c index a78950875..c71b04c32 100644 --- a/src/commands/rpcpv1_ver.c +++ b/src/commands/rpcpv1_ver.c @@ -70,6 +70,7 @@ const static struct proto_cap proto_caps[] = { { "20230314", "Support for for \"fusing\" G and D commands" }, { "20230424", "Support for for \"longest_ipi\", \"rtpa_jlast\", \"rtpa_jmax\" and \"rtpa_javg\" counters" }, { "20250523", "Support for the \"P\" modifier in the C command"}, + { "20251015", "Support for changing session's ttl / IP tos via S subcommand" }, { NULL, NULL } }; diff --git a/src/rtpp_command.c b/src/rtpp_command.c index 923bc4085..95bccdd41 100644 --- a/src/rtpp_command.c +++ b/src/rtpp_command.c @@ -101,6 +101,7 @@ struct create_listener_args { const struct sockaddr *ia; struct rtpp_socket **fds; int *port; + int tos; }; static enum rtpp_ptu_rval @@ -129,9 +130,9 @@ create_listener(struct create_listener_args *ctap, unsigned int port, struct rtp } goto e1; } - if ((ctap->ia->sa_family == AF_INET) && (ctap->cfs->tos >= 0) && - (CALL_SMETHOD(fd, settos, ctap->cfs->tos) == -1)) - RTPP_ELOG(ctap->cfs->glog, RTPP_LOG_ERR, "unable to set TOS to %d", ctap->cfs->tos); + if ((ctap->ia->sa_family == AF_INET) && (ctap->tos >= 0) && + (CALL_SMETHOD(fd, settos, ctap->tos) == -1)) + RTPP_ELOG(ctap->cfs->glog, RTPP_LOG_ERR, "unable to set TOS to %d", ctap->tos); so_rcvbuf = 256 * 1024; if (CALL_SMETHOD(fd, setrbuf, so_rcvbuf) == -1) RTPP_ELOG(ctap->cfs->glog, RTPP_LOG_ERR, "unable to set 256K receive buffer size"); @@ -178,7 +179,7 @@ create_twinlistener(unsigned int port, void *ap) int rtpp_create_listener(const struct rtpp_cfg *cfsp, const struct sockaddr *ia, int *port, - struct rtpp_socket **fds) + struct rtpp_socket **fds, int tos) { struct create_listener_args cta; int i; @@ -189,6 +190,7 @@ rtpp_create_listener(const struct rtpp_cfg *cfsp, const struct sockaddr *ia, int cta.fds = fds; cta.ia = ia; cta.port = port; + cta.tos = tos; for (i = 0; i < 2; i++) fds[i] = NULL; diff --git a/src/rtpp_command.h b/src/rtpp_command.h index 27523fc21..38b3a5e11 100644 --- a/src/rtpp_command.h +++ b/src/rtpp_command.h @@ -52,7 +52,7 @@ struct rtpp_command *get_command(const struct rtpp_cfg *, struct rtpp_ctrl_sock const struct rtpp_timestamp *, struct rtpp_command_stats *csp, struct rtpp_cmd_rcache *); int rtpp_create_listener(const struct rtpp_cfg *, const struct sockaddr *, int *, - struct rtpp_socket **) RTPP_EXPORT; + struct rtpp_socket **, int) RTPP_EXPORT; struct rtpp_command *rtpp_command_ctor(const struct rtpp_cfg *, int, const struct rtpp_timestamp *, struct rtpp_command_stats *, int); int rtpp_command_split(struct rtpp_command *, int, int *, struct rtpp_cmd_rcache *); diff --git a/src/rtpp_command_sub.h b/src/rtpp_command_sub.h index 01d298fa4..54d889ff9 100644 --- a/src/rtpp_command_sub.h +++ b/src/rtpp_command_sub.h @@ -30,6 +30,7 @@ struct rtpp_session; struct rtpp_stream; struct rtpp_command_args; +struct rtpp_log; struct rtpp_subc_resp { int result; @@ -42,6 +43,7 @@ struct rtpp_subc_ctx { struct rtpp_stream *strmp_out; const struct rtpp_command_args *subc_args; struct rtpp_subc_resp *resp; + struct rtpp_log *log; }; #endif /* _RTPP_COMMAND_SUB_H_ */ diff --git a/src/rtpp_record.h b/src/rtpp_record.h index be14458a9..0f6e55fdf 100644 --- a/src/rtpp_record.h +++ b/src/rtpp_record.h @@ -42,6 +42,7 @@ struct remote_copy_args { const struct sockaddr *laddr; int lport; struct rtpp_socket *fds[2]; + int tos; }; DECLARE_CLASS(rtpp_record, const struct rtpp_cfg *, const struct remote_copy_args *, struct rtpp_session *, diff --git a/src/rtpp_session.c b/src/rtpp_session.c index c85158980..811faa0bf 100644 --- a/src/rtpp_session.c +++ b/src/rtpp_session.c @@ -96,7 +96,7 @@ rtpp_session_ctor(const struct rtpp_session_ctor_args *ap) goto e0; } - if (rtpp_create_listener(cfs, ap->lia[0], &lport, fds) == -1) { + if (rtpp_create_listener(cfs, ap->lia[0], &lport, fds, cfs->tos) == -1) { RTPP_LOG(log, RTPP_LOG_ERR, "can't create listener"); goto e1; } diff --git a/src/rtpp_stream.c b/src/rtpp_stream.c index 1fd0ebf14..e7b0085d9 100644 --- a/src/rtpp_stream.c +++ b/src/rtpp_stream.c @@ -323,9 +323,11 @@ rtpp_stream_ctor(const struct r_stream_ctor_args *ap) pvt->rtpp_stats = cfs->rtpp_stats; pvt->pub.side = ap->side; pvt->pub.pipe_type = pap->pipe_type; + pvt->pub.tos = cfs->tos; pvt->pub.stuid = CALL_SMETHOD(cfs->guid, gen); pvt->pub.seuid = pap->seuid; + pvt->pub.stream_ttl = cfs->max_ttl; for (unsigned int i = 0; i < nmodules; i++) { atomic_init(&(pvt->pmod_data.adp[i]), NULL); } diff --git a/src/rtpp_stream.h b/src/rtpp_stream.h index 839a527e2..791c7216a 100644 --- a/src/rtpp_stream.h +++ b/src/rtpp_stream.h @@ -141,6 +141,7 @@ DECLARE_CLASS_PUBTYPE(rtpp_stream, { const struct sockaddr *laddr; int port; int asymmetric; + int stream_ttl; enum rtpp_stream_side side; /* Flags: strong create/delete; weak ones */ int weak; @@ -153,6 +154,8 @@ DECLARE_CLASS_PUBTYPE(rtpp_stream, { char *codecs; /* Requested ptime */ int ptime; + /* Desired IP TOS/DSCP value */ + int tos; /* UID, read-only */ uint64_t stuid; /* UID of the session we belong to, read-only */ diff --git a/src/rtpp_util.c b/src/rtpp_util.c index ee3cdb7fa..b98c20872 100644 --- a/src/rtpp_util.c +++ b/src/rtpp_util.c @@ -399,6 +399,31 @@ atoi_saferange(const char *s, int *res, int min, int max) return (ATOI_OK); } +enum atoi_rval +strtol_saferange(const char *s, long *res, long min, long max, + const char **next) +{ + char *cp; + long rval; + + errno = 0; + rval = strtol(s, &cp, 10); + if (cp == s) { + return (ATOI_NOTINT); + } + if (errno == ERANGE) { + return (ATOI_OUTRANGE); + } + if (rval < min || (max >= min && rval > max)) { + return (ATOI_OUTRANGE); + } + if (next != NULL) { + *next = cp; + } + *res = rval; + return (ATOI_OK); +} + #if defined(_SC_CLK_TCK) && !defined(__FreeBSD__) #if defined(LINUX_XXX) static int diff --git a/src/rtpp_util.h b/src/rtpp_util.h index 14ca0d4e3..e7edcef0a 100644 --- a/src/rtpp_util.h +++ b/src/rtpp_util.h @@ -61,6 +61,8 @@ enum atoi_rval {ATOI_OK = 0, ATOI_NOTINT = -1, ATOI_OUTRANGE = -2}; enum atoi_rval atoi_safe_sep(const char *, int *, char, const char **); enum atoi_rval atoi_safe(const char *, int *); enum atoi_rval atoi_saferange(const char *, int *, int, int) RTPP_EXPORT; +enum atoi_rval strtol_saferange(const char *, long *, long, long, + const char **) RTPP_EXPORT; void rtpp_strsplit(char *, char *, size_t, size_t); void generate_random_string(char *, int) RTPP_EXPORT; From b57c0679a425da91473b4fdaa3964c613cb59420 Mon Sep 17 00:00:00 2001 From: Maksym Sobolyev Date: Sat, 17 Jan 2026 20:08:26 -0800 Subject: [PATCH 5/7] Extend playback tests to verify "set TOS" subcommand. Add session_timeouts/set_ttl test to excercise && S ttl=x sub-command. --- tests/playback/playback1 | 7 ++++++ tests/playback/playback1.sub | 10 ++++++++ tests/playback/playback1.type4.check | 1 + tests/playback/playback1.type4.input | 2 +- tests/playback/playback1.type5.check | 1 + tests/playback/playback1.type5.input | 2 +- tests/playback/playback1.type6.check | 1 + tests/playback/playback1.type6.input | 3 +-- tests/playback/playback1.type6.output | 2 +- tests/playback/playback1.type6.st2.input | 3 ++- tests/playback/playback1.type7.check | 1 + tests/playback/playback1.type7.input | 4 +-- tests/playback/playback1.type7.output | 4 +-- tests/playback/playback1.type7.st2.input | 4 +-- tests/session_timeouts/Makefile.ami | 2 +- tests/session_timeouts/set_ttl | 9 +++++++ tests/session_timeouts/set_ttl.rptl | 32 ++++++++++++++++++++++++ 17 files changed, 75 insertions(+), 13 deletions(-) create mode 100644 tests/playback/playback1.sub create mode 100644 tests/playback/playback1.type4.check create mode 100644 tests/playback/playback1.type5.check create mode 100644 tests/playback/playback1.type6.check create mode 100644 tests/playback/playback1.type7.check create mode 100755 tests/session_timeouts/set_ttl create mode 100644 tests/session_timeouts/set_ttl.rptl diff --git a/tests/playback/playback1 b/tests/playback/playback1 index 1cdd321dc..64ea815e2 100755 --- a/tests/playback/playback1 +++ b/tests/playback/playback1 @@ -6,7 +6,9 @@ BASEDIR="`dirname "${0}"`/.." SUDO_REQUIRED=1 + . "${BASEDIR}/functions" +. "${BASEDIR}/playback/playback1.sub" TARGET_PORT=12344 RTPP_TIMEOUT=8 @@ -128,5 +130,10 @@ do ${DIFF} playback1.rout ${MODEL_ROUT} report "checking rtpproxy stdout" sha256_verify ${ofile} playback/playback1.checksums + EXTRA_CHECK="playback/playback1.type${ttype}.check" + if [ -e "${EXTRA_CHECK}" ] + then + . "${EXTRA_CHECK}" + fi done done diff --git a/tests/playback/playback1.sub b/tests/playback/playback1.sub new file mode 100644 index 000000000..0eaefd933 --- /dev/null +++ b/tests/playback/playback1.sub @@ -0,0 +1,10 @@ +checktos() { + if ! ${TCPDUMP} -r "${1}" >/dev/null 2>&1 + then + cp "`which tcpdump`" /tmp + local TCPDUMP="/tmp/tcpdump" + fi + RES="`${TCPDUMP} -r "${1}" -v | grep 'tos ' | sed 's|.*tos ||;s|,.*||' | uniq`" + test "${RES}" = "${2}" + report "checking TOS [${RES}]" +} diff --git a/tests/playback/playback1.type4.check b/tests/playback/playback1.type4.check new file mode 100644 index 000000000..5199a6d7c --- /dev/null +++ b/tests/playback/playback1.type4.check @@ -0,0 +1 @@ +checktos "playback1.${codec}.a.rtp" "0x2a" diff --git a/tests/playback/playback1.type4.input b/tests/playback/playback1.type4.input index 41d47894a..a5833c3bf 100644 --- a/tests/playback/playback1.type4.input +++ b/tests/playback/playback1.type4.input @@ -1,4 +1,4 @@ -U callid_1 127.0.0.1 %%PORT1%% from_tag_1 +U callid_1 127.0.0.1 %%PORT1%% from_tag_1 && S tos=42 P callid_1 playback1 %%CODEC%% from_tag_1 L callid_1 127.0.0.1 %%PORT2%% from_tag_1 to_tag_1 U6 callid_1_ipv6 ::1 %%PORT1%% from_tag_1 diff --git a/tests/playback/playback1.type5.check b/tests/playback/playback1.type5.check new file mode 100644 index 000000000..d15746657 --- /dev/null +++ b/tests/playback/playback1.type5.check @@ -0,0 +1 @@ +checktos "playback1.${codec}.a.rtp" "0xb8" diff --git a/tests/playback/playback1.type5.input b/tests/playback/playback1.type5.input index 0ef8703f2..d7f7cf6a0 100644 --- a/tests/playback/playback1.type5.input +++ b/tests/playback/playback1.type5.input @@ -1,4 +1,4 @@ -U callid_1 127.0.0.1 %%PORT1%% from_tag_1 +U callid_1 127.0.0.1 %%PORT1%% from_tag_1 && Sr tos=42 P callid_1 playback1 %%CODEC%% from_tag_1 U6 callid_1_ipv6 ::1 %%PORT1%% from_tag_1 P callid_1_ipv6 playback1 %%CODEC%% from_tag_1 diff --git a/tests/playback/playback1.type6.check b/tests/playback/playback1.type6.check new file mode 100644 index 000000000..19ba52af5 --- /dev/null +++ b/tests/playback/playback1.type6.check @@ -0,0 +1 @@ +checktos "playback1.${codec}.a.rtp" "0x2b" diff --git a/tests/playback/playback1.type6.input b/tests/playback/playback1.type6.input index 9b0cf00fe..d84a999e1 100644 --- a/tests/playback/playback1.type6.input +++ b/tests/playback/playback1.type6.input @@ -1,4 +1,3 @@ -Ul127.0.0.1 callid_1 127.0.0.1 %%PORT1%% from_tag_1 -P callid_1 playback1 %%CODEC%% from_tag_1 +Ul127.0.0.1 callid_1 127.0.0.1 %%PORT1%% from_tag_1 && S tos=42 U6 callid_1_ipv6 ::1 %%PORT1%% from_tag_1 P callid_1_ipv6 playback1 %%CODEC%% from_tag_1 diff --git a/tests/playback/playback1.type6.output b/tests/playback/playback1.type6.output index 0ec6dc83f..c5362f6c9 100644 --- a/tests/playback/playback1.type6.output +++ b/tests/playback/playback1.type6.output @@ -1,8 +1,8 @@ 12000 127.0.0.1 -0 12000 0 12002 127.0.0.1 +0 12002 12004 127.0.0.1 MEMDEB(rtpproxy): all clear diff --git a/tests/playback/playback1.type6.st2.input b/tests/playback/playback1.type6.st2.input index 981f9ccf1..54635e3bf 100644 --- a/tests/playback/playback1.type6.st2.input +++ b/tests/playback/playback1.type6.st2.input @@ -1,2 +1,3 @@ -Ll127.0.0.1 callid_1 127.0.0.1 %%PORT2%% from_tag_1 to_tag_1 +Ll127.0.0.1 callid_1 127.0.0.1 %%PORT2%% from_tag_1 to_tag_1 && Sr tos=43 +P callid_1 playback1 %%CODEC%% from_tag_1 L6 callid_1_ipv6 ::1 %%PORT2%% from_tag_1 to_tag_1 diff --git a/tests/playback/playback1.type7.check b/tests/playback/playback1.type7.check new file mode 100644 index 000000000..5199a6d7c --- /dev/null +++ b/tests/playback/playback1.type7.check @@ -0,0 +1 @@ +checktos "playback1.${codec}.a.rtp" "0x2a" diff --git a/tests/playback/playback1.type7.input b/tests/playback/playback1.type7.input index d1fda2486..f499e80e2 100644 --- a/tests/playback/playback1.type7.input +++ b/tests/playback/playback1.type7.input @@ -1,4 +1,4 @@ -Ur127.0.0.1 callid_1 127.0.0.1 %%PORT1%% from_tag_1 +Ur127.0.0.1 callid_1 127.0.0.1 %%PORT1%% from_tag_1 && S tos=42 P callid_1 playback1 %%CODEC%% from_tag_1 -U6 callid_1_ipv6 ::1 %%PORT1%% from_tag_1 +U6 callid_1_ipv6 ::1 %%PORT1%% from_tag_1 && S tos=42 P callid_1_ipv6 playback1 %%CODEC%% from_tag_1 diff --git a/tests/playback/playback1.type7.output b/tests/playback/playback1.type7.output index 0ec6dc83f..cd564bd66 100644 --- a/tests/playback/playback1.type7.output +++ b/tests/playback/playback1.type7.output @@ -1,8 +1,8 @@ 12000 127.0.0.1 0 -12000 +12000 && -1 0 12002 127.0.0.1 -12002 +12002 && -1 12004 127.0.0.1 MEMDEB(rtpproxy): all clear diff --git a/tests/playback/playback1.type7.st2.input b/tests/playback/playback1.type7.st2.input index 5ce8b64a6..1d272ed61 100644 --- a/tests/playback/playback1.type7.st2.input +++ b/tests/playback/playback1.type7.st2.input @@ -1,2 +1,2 @@ -Lr127.0.0.1 callid_1 127.0.0.1 %%PORT2%% from_tag_1 to_tag_1 -L6 callid_1_ipv6 ::1 %%PORT2%% from_tag_1 to_tag_1 +Lr127.0.0.1 callid_1 127.0.0.1 %%PORT2%% from_tag_1 to_tag_1 && S tos=43 +L6 callid_1_ipv6 ::1 %%PORT2%% from_tag_1 to_tag_1 && S tos=43 diff --git a/tests/session_timeouts/Makefile.ami b/tests/session_timeouts/Makefile.ami index 770445459..3113d5001 100644 --- a/tests/session_timeouts/Makefile.ami +++ b/tests/session_timeouts/Makefile.ami @@ -3,6 +3,6 @@ session_timeouts_CLEANFILES = session_timeouts.rout[1234567].[1234] session_time session_timeouts.tlog session_timeouts.tlog.sorted session_timeouts.qout[1234567].[1234] \ session_timeouts.fout[1234567].[1234] TESTS += session_timeouts/notify_tcp session_timeouts/notify_tcp_wild \ - session_timeouts/notify_unix + session_timeouts/notify_unix session_timeouts/set_ttl CLEANFILES += ${session_timeouts_CLEANFILES} EXTRA_DIST += ${session_timeouts_EXTRA_DIST} diff --git a/tests/session_timeouts/set_ttl b/tests/session_timeouts/set_ttl new file mode 100755 index 000000000..61466cb81 --- /dev/null +++ b/tests/session_timeouts/set_ttl @@ -0,0 +1,9 @@ +#!/bin/sh + +BASEDIR="${BASEDIR:-$(dirname -- $0)/..}" +BASEDIR="$(readlink -f -- $BASEDIR)" + +. "${BASEDIR}/functions" + +${RPTL_INT} -s "${BASEDIR}/session_timeouts/set_ttl.rptl" +report "running set_ttl.rptl RPTL script" diff --git a/tests/session_timeouts/set_ttl.rptl b/tests/session_timeouts/set_ttl.rptl new file mode 100644 index 000000000..9fb5d7ccc --- /dev/null +++ b/tests/session_timeouts/set_ttl.rptl @@ -0,0 +1,32 @@ +.eval: 0 -> SESS_NOTFOUND +.eval: ../src/rtpproxy_debug -> RTPPROXY_BIN +socket rtpp: stdio: -d warn -p /dev/null + +.echo: Setting up sessions... +rtpp: U callid_1 127.0.0.1 12345 from_tag_1 to_tag_1 && S ttl=2 -> validate_port(_) +rtpp: L callid_1 127.0.0.1 54321 from_tag_1 to_tag_1 -> validate_port(_) +rtpp: U callid_2 127.0.0.1 12345 from_tag_2 to_tag_2 -> validate_port(_) +rtpp: L callid_2 127.0.0.1 54321 from_tag_2 to_tag_2 && S ttl=4 -> validate_port(_) +rtpp: U callid_3 127.0.0.1 12345 from_tag_3 to_tag_3 && S ttl=1 -> validate_port(_) +rtpp: L callid_3 127.0.0.1 54321 from_tag_3 to_tag_3 && S ttl=8 -> validate_port(_) + +.sleep: 1.5 +.echo: Checking sessions (1 of 4)... +rtpp: L callid_1 127.0.0.1 54321 from_tag_1 to_tag_1 -> validate_port(_) +rtpp: L callid_2 127.0.0.1 54321 from_tag_2 to_tag_2 -> validate_port(_) +rtpp: L callid_3 127.0.0.1 54321 from_tag_3 to_tag_3 -> validate_port(_) + +.sleep: 3.5 +.echo: Checking sessions (2 of 4)... +rtpp: L callid_1 127.0.0.1 54321 from_tag_1 to_tag_1 -> str_compare(SESS_NOTFOUND) +rtpp: L callid_2 127.0.0.1 54321 from_tag_2 to_tag_2 -> validate_port(_) +rtpp: L callid_3 127.0.0.1 54321 from_tag_3 to_tag_3 -> validate_port(_) + +.sleep: 5.5 +.echo: Checking sessions (3 of 4)... +rtpp: L callid_2 127.0.0.1 54321 from_tag_2 to_tag_2 -> str_compare(SESS_NOTFOUND) +rtpp: L callid_3 127.0.0.1 54321 from_tag_3 to_tag_3 -> validate_port(_) + +.sleep: 9.5 +.echo: Checking sessions (4 of 4)... +rtpp: L callid_3 127.0.0.1 54321 from_tag_3 to_tag_3 -> str_compare(SESS_NOTFOUND) From 5d28486fc4fe680b68fe113a5d46278c7c14fa78 Mon Sep 17 00:00:00 2001 From: Maksym Sobolyev Date: Mon, 26 Jan 2026 17:31:40 -0800 Subject: [PATCH 6/7] Move rtpp_proc_async_setprocname() into its own TU since it requires pthread_t and not of all users of rtpp_proc_async.h have pthread.h. --- src/Makefile.am | 2 +- src/rtpp_proc_async.c | 14 +----------- src/rtpp_proc_async.h | 1 - src/rtpp_proc_util.c | 51 ++++++++++++++++++++++++++++++++++++++++++ src/rtpp_proc_util.h | 30 +++++++++++++++++++++++++ src/rtpp_proc_wakeup.c | 1 + 6 files changed, 84 insertions(+), 15 deletions(-) create mode 100644 src/rtpp_proc_util.c create mode 100644 src/rtpp_proc_util.h diff --git a/src/Makefile.am b/src/Makefile.am index b43170b32..8f18c53b6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -56,7 +56,7 @@ BASE_SOURCES=main.c rtp.h rtpp_server.c \ rtp_packet.c rtpp_time.c rtpp_time.h rtpp_pcnts_strm.h rtpp_runcreds.h \ rtpp_sessinfo.c rtpp_weakref.c rtpp_rw_lock.c \ rtpp_proc_servers.c rtpp_stream.c rtpp_proc_wakeup.c \ - rtpp_genuid.c \ + rtpp_genuid.c rtpp_proc_util.c rtpp_proc_util.h \ rtpp_log_obj.c rtpp_socket.c rtpp_wi_apis.c rtpp_wi_apis.h \ rtpp_ttl.c rtpp_proc_ttl.h rtpp_proc_ttl.c \ rtpp_pipe.c rtpp_pcount.c rtpp_debug.h rtpp_wi_sgnl.c rtpp_wi_sgnl.h \ diff --git a/src/rtpp_proc_async.c b/src/rtpp_proc_async.c index 9c1d1f460..5f8c1414b 100644 --- a/src/rtpp_proc_async.c +++ b/src/rtpp_proc_async.c @@ -56,6 +56,7 @@ #include "rtpp_netio_async.h" #include "rtpp_proc.h" #include "rtpp_proc_async.h" +#include "rtpp_proc_util.h" #include "rtpp_proc_wakeup.h" #include "rtpp_mallocs.h" #include "rtpp_sessinfo.h" @@ -209,19 +210,6 @@ rtpp_proc_async_run(void *arg) rtpp_polltbl_free(&tcp->ptbl); } -void -rtpp_proc_async_setprocname(pthread_t thread_id, const char *pname) -{ -#if HAVE_PTHREAD_SETNAME_NP - const char ppr[] = "rtpp_proc: "; - char *ptrname = alloca(sizeof(ppr) + strlen(pname)); - if (ptrname != NULL) { - sprintf(ptrname, "%s%s", ppr, pname); - (void)pthread_setname_np(thread_id, ptrname); - } -#endif -} - static int rtpp_proc_async_thread_init(const struct rtpp_cfg *cfsp, const struct rtpp_proc_async_cf *proc_cf, struct rtpp_proc_thread_cf *tcp, int pipe_type) diff --git a/src/rtpp_proc_async.h b/src/rtpp_proc_async.h index b348173c4..7e381a47c 100644 --- a/src/rtpp_proc_async.h +++ b/src/rtpp_proc_async.h @@ -41,6 +41,5 @@ struct rtpp_proc_async { }; struct rtpp_proc_async *rtpp_proc_async_ctor(const struct rtpp_cfg *); -void rtpp_proc_async_setprocname(pthread_t thread_id, const char *pname); #endif diff --git a/src/rtpp_proc_util.c b/src/rtpp_proc_util.c new file mode 100644 index 000000000..4ea4ae7da --- /dev/null +++ b/src/rtpp_proc_util.c @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2014 Sippy Software, Inc., http://www.sippysoft.com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + + */ + +#if defined(LINUX_XXX) && !defined(_GNU_SOURCE) +#define _GNU_SOURCE /* pthread_setname_np() */ +#endif + +#include +#include +#include +#include + +#include "config.h" + +void +rtpp_proc_async_setprocname(pthread_t thread_id, const char *pname) +{ +#if HAVE_PTHREAD_SETNAME_NP + const char ppr[] = "rtpp_proc: "; + char *ptrname = alloca(sizeof(ppr) + strlen(pname)); + if (ptrname != NULL) { + sprintf(ptrname, "%s%s", ppr, pname); + (void)pthread_setname_np(thread_id, ptrname); + } +#endif +} diff --git a/src/rtpp_proc_util.h b/src/rtpp_proc_util.h new file mode 100644 index 000000000..57c576202 --- /dev/null +++ b/src/rtpp_proc_util.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2014 Sippy Software, Inc., http://www.sippysoft.com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#pragma once + +void rtpp_proc_async_setprocname(pthread_t thread_id, const char *pname); diff --git a/src/rtpp_proc_wakeup.c b/src/rtpp_proc_wakeup.c index 62e6da7e0..60a3a0747 100644 --- a/src/rtpp_proc_wakeup.c +++ b/src/rtpp_proc_wakeup.c @@ -45,6 +45,7 @@ #include "rtpp_time.h" #include "rtpp_threads.h" #include "rtpp_proc_async.h" +#include "rtpp_proc_util.h" #include "rtpp_proc_wakeup_fin.h" #include "rtpp_proc_wakeup.h" From 911384240e145d1ad9a56ade1c082f3ca494ffe0 Mon Sep 17 00:00:00 2001 From: Maksym Sobolyev Date: Mon, 24 May 2021 02:44:34 -0700 Subject: [PATCH 7/7] Re-gen. --- configure | 149 +++++++++++++++++++++++++++++++ src/Makefile.in | 218 +++++++++++++++++++++++++++++++--------------- src/config.h.in | 4 + tests/Makefile.in | 1 + 4 files changed, 300 insertions(+), 72 deletions(-) diff --git a/configure b/configure index 9fdaca463..13d2748ff 100755 --- a/configure +++ b/configure @@ -2029,6 +2029,60 @@ fi as_fn_set_status $ac_retval } # ac_fn_c_try_run + +# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR +# ------------------------------------------------------------------ +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. +ac_fn_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +printf %s "checking whether $as_decl_name is declared... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + eval ac_save_FLAGS=\$$6 + as_fn_append $6 " $5" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else case e in #( + e) eval "$3=no" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + eval $6=\$ac_save_FLAGS + ;; +esac +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_check_decl ac_configure_args_raw= for ac_arg do @@ -15437,6 +15491,101 @@ then : fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } +if test ${ac_cv_c_undeclared_builtin_options+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_save_CFLAGS=$CFLAGS + ac_cv_c_undeclared_builtin_options='cannot detect' + for ac_arg in '' -fno-builtin; do + CFLAGS="$ac_save_CFLAGS $ac_arg" + # This test program should *not* compile successfully. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +(void) strchr; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else case e in #( + e) # This test program should compile successfully. + # No library function is consistently available on + # freestanding implementations, so test against a dummy + # declaration. Include always-available headers on the + # off chance that they somehow elicit warnings. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +extern void ac_decl (int, char *); + +int +main (void) +{ +(void) ac_decl (0, (char *) 0); + (void) ac_decl; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + if test x"$ac_arg" = x +then : + ac_cv_c_undeclared_builtin_options='none needed' +else case e in #( + e) ac_cv_c_undeclared_builtin_options=$ac_arg ;; +esac +fi + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done + CFLAGS=$ac_save_CFLAGS + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 +printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } + case $ac_cv_c_undeclared_builtin_options in #( + 'cannot detect') : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error $? "cannot make $CC report undeclared builtins +See 'config.log' for more details" "$LINENO" 5; } ;; #( + 'none needed') : + ac_c_undeclared_builtin_options='' ;; #( + *) : + ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; +esac + +ac_fn_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_optreset" = xyes +then : + ac_have_decl=1 +else case e in #( + e) ac_have_decl=0 ;; +esac +fi +printf "%s\n" "#define HAVE_DECL_OPTRESET $ac_have_decl" >>confdefs.h + + # Check whether --enable-docs was given. if test ${enable_docs+y} then : diff --git a/src/Makefile.in b/src/Makefile.in index b6cfc89f0..af0e544f1 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -191,28 +191,30 @@ am__librtpproxy_la_SOURCES_DIST = main.c rtp.h rtpp_server.c \ rtp_packet.c rtpp_time.c rtpp_time.h rtpp_pcnts_strm.h \ rtpp_runcreds.h rtpp_sessinfo.c rtpp_weakref.c rtpp_rw_lock.c \ rtpp_proc_servers.c rtpp_stream.c rtpp_proc_wakeup.c \ - rtpp_genuid.c rtpp_log_obj.c rtpp_socket.c rtpp_wi_apis.c \ - rtpp_wi_apis.h rtpp_ttl.c rtpp_proc_ttl.h rtpp_proc_ttl.c \ - rtpp_pipe.c rtpp_pcount.c rtpp_debug.h rtpp_wi_sgnl.c \ - rtpp_wi_sgnl.h rtpp_wi_data.c rtpp_wi_data.h rtpp_pcnt_strm.c \ - rtpp_endian.h rtpp_ringbuf.c $(CMDSRCDIR)/rpcpv1_delete.c \ - $(CMDSRCDIR)/rpcpv1_delete.h $(CMDSRCDIR)/rpcpv1_record.c \ - $(CMDSRCDIR)/rpcpv1_record.h rtpp_port_table.c rtpp_acct.c \ - rtpp_acct.h rtpp_stats.h rtpp_bindaddrs.c rtpp_bindaddrs.h \ - rtpp_ssrc.h rtpp_netaddr.c rtpp_acct_pipe.h \ - $(CMDSRCDIR)/rpcpv1_play.c $(CMDSRCDIR)/rpcpv1_play.h \ - $(CMDSRCDIR)/rpcpv1_ver.h $(CMDSRCDIR)/rpcpv1_ver.c \ - rtpp_pearson_perfect.c rtpp_acct_rtcp.h rtpp_acct_rtcp.c \ - rtpp_cfile.c rtpp_cfile.h rtpp_ucl.c rtpp_ucl.h \ - rtpp_network_io.c rtpp_network_io.h rtpp_wi_pkt.c \ - rtpp_wi_pkt.h rtpp_timeout_data.c rtpp_timeout_data.h \ - rtpp_locking.h rtpp_nofile.c rtpp_nofile.h rtpp_record_adhoc.h \ - $(CMDSRCDIR)/rpcpv1_norecord.c $(CMDSRCDIR)/rpcpv1_norecord.h \ - $(CMDSRCDIR)/rpcpv1_ul_subc.c $(CMDSRCDIR)/rpcpv1_ul_subc.h \ - rtpp_command_rcache.h rtpp_log_obj.h rtpp_port_table.h \ - rtpp_timed_task.h rtpp_modman.h rtpp_module_if.h rtpp_epoll.c \ - rtpp_str.c rtpp_str.h rtpp_sbuf.c rtpp_sbuf.h rtpp_refproxy.c \ - rtpp_command_reply.c $(ADV_DIR)/packet_observer.h \ + rtpp_genuid.c rtpp_proc_util.c rtpp_proc_util.h rtpp_log_obj.c \ + rtpp_socket.c rtpp_wi_apis.c rtpp_wi_apis.h rtpp_ttl.c \ + rtpp_proc_ttl.h rtpp_proc_ttl.c rtpp_pipe.c rtpp_pcount.c \ + rtpp_debug.h rtpp_wi_sgnl.c rtpp_wi_sgnl.h rtpp_wi_data.c \ + rtpp_wi_data.h rtpp_pcnt_strm.c rtpp_endian.h rtpp_ringbuf.c \ + $(CMDSRCDIR)/rpcpv1_delete.c $(CMDSRCDIR)/rpcpv1_delete.h \ + $(CMDSRCDIR)/rpcpv1_record.c $(CMDSRCDIR)/rpcpv1_record.h \ + rtpp_port_table.c rtpp_acct.c rtpp_acct.h rtpp_stats.h \ + rtpp_bindaddrs.c rtpp_bindaddrs.h rtpp_ssrc.h rtpp_netaddr.c \ + rtpp_acct_pipe.h $(CMDSRCDIR)/rpcpv1_play.c \ + $(CMDSRCDIR)/rpcpv1_play.h $(CMDSRCDIR)/rpcpv1_ver.h \ + $(CMDSRCDIR)/rpcpv1_ver.c rtpp_pearson_perfect.c \ + rtpp_acct_rtcp.h rtpp_acct_rtcp.c rtpp_cfile.c rtpp_cfile.h \ + rtpp_ucl.c rtpp_ucl.h rtpp_network_io.c rtpp_network_io.h \ + rtpp_wi_pkt.c rtpp_wi_pkt.h rtpp_timeout_data.c \ + rtpp_timeout_data.h rtpp_locking.h rtpp_nofile.c rtpp_nofile.h \ + rtpp_record_adhoc.h $(CMDSRCDIR)/rpcpv1_norecord.c \ + $(CMDSRCDIR)/rpcpv1_norecord.h $(CMDSRCDIR)/rpcpv1_ul_subc.c \ + $(CMDSRCDIR)/rpcpv1_ul_subc.h rtpp_command_rcache.h \ + rtpp_log_obj.h rtpp_port_table.h rtpp_timed_task.h \ + rtpp_modman.h rtpp_module_if.h rtpp_epoll.c rtpp_str.c \ + rtpp_str.h rtpp_sbuf.c rtpp_sbuf.h rtpp_refproxy.c \ + rtpp_command_reply.c $(CMDSRCDIR)/rpcpv1_ul_subc_set.c \ + $(CMDSRCDIR)/rpcpv1_ul_subc_set.h $(ADV_DIR)/packet_observer.h \ $(ADV_DIR)/pproc_manager.c $(ADV_DIR)/pproc_manager.h \ rtpp_modman.c rtpp_module_if_static.c rtpp_module_if_static.h \ rtpp_module_if.c rtpp_module.h rtpp_log_stand.c \ @@ -270,11 +272,12 @@ am__objects_6 = librtpproxy_la-main.lo librtpproxy_la-rtpp_server.lo \ librtpproxy_la-rtpp_proc_servers.lo \ librtpproxy_la-rtpp_stream.lo \ librtpproxy_la-rtpp_proc_wakeup.lo \ - librtpproxy_la-rtpp_genuid.lo librtpproxy_la-rtpp_log_obj.lo \ - librtpproxy_la-rtpp_socket.lo librtpproxy_la-rtpp_wi_apis.lo \ - librtpproxy_la-rtpp_ttl.lo librtpproxy_la-rtpp_proc_ttl.lo \ - librtpproxy_la-rtpp_pipe.lo librtpproxy_la-rtpp_pcount.lo \ - librtpproxy_la-rtpp_wi_sgnl.lo librtpproxy_la-rtpp_wi_data.lo \ + librtpproxy_la-rtpp_genuid.lo librtpproxy_la-rtpp_proc_util.lo \ + librtpproxy_la-rtpp_log_obj.lo librtpproxy_la-rtpp_socket.lo \ + librtpproxy_la-rtpp_wi_apis.lo librtpproxy_la-rtpp_ttl.lo \ + librtpproxy_la-rtpp_proc_ttl.lo librtpproxy_la-rtpp_pipe.lo \ + librtpproxy_la-rtpp_pcount.lo librtpproxy_la-rtpp_wi_sgnl.lo \ + librtpproxy_la-rtpp_wi_data.lo \ librtpproxy_la-rtpp_pcnt_strm.lo \ librtpproxy_la-rtpp_ringbuf.lo \ $(CMDSRCDIR)/librtpproxy_la-rpcpv1_delete.lo \ @@ -295,6 +298,7 @@ am__objects_6 = librtpproxy_la-main.lo librtpproxy_la-rtpp_server.lo \ librtpproxy_la-rtpp_epoll.lo librtpproxy_la-rtpp_str.lo \ librtpproxy_la-rtpp_sbuf.lo librtpproxy_la-rtpp_refproxy.lo \ librtpproxy_la-rtpp_command_reply.lo \ + $(CMDSRCDIR)/librtpproxy_la-rpcpv1_ul_subc_set.lo \ $(ADV_DIR)/librtpproxy_la-pproc_manager.lo \ librtpproxy_la-rtpp_modman.lo \ librtpproxy_la-rtpp_module_if_static.lo $(am__objects_3) \ @@ -640,28 +644,30 @@ am__rtpproxy_debug_SOURCES_DIST = main.c rtp.h rtpp_server.c \ rtp_packet.c rtpp_time.c rtpp_time.h rtpp_pcnts_strm.h \ rtpp_runcreds.h rtpp_sessinfo.c rtpp_weakref.c rtpp_rw_lock.c \ rtpp_proc_servers.c rtpp_stream.c rtpp_proc_wakeup.c \ - rtpp_genuid.c rtpp_log_obj.c rtpp_socket.c rtpp_wi_apis.c \ - rtpp_wi_apis.h rtpp_ttl.c rtpp_proc_ttl.h rtpp_proc_ttl.c \ - rtpp_pipe.c rtpp_pcount.c rtpp_debug.h rtpp_wi_sgnl.c \ - rtpp_wi_sgnl.h rtpp_wi_data.c rtpp_wi_data.h rtpp_pcnt_strm.c \ - rtpp_endian.h rtpp_ringbuf.c $(CMDSRCDIR)/rpcpv1_delete.c \ - $(CMDSRCDIR)/rpcpv1_delete.h $(CMDSRCDIR)/rpcpv1_record.c \ - $(CMDSRCDIR)/rpcpv1_record.h rtpp_port_table.c rtpp_acct.c \ - rtpp_acct.h rtpp_stats.h rtpp_bindaddrs.c rtpp_bindaddrs.h \ - rtpp_ssrc.h rtpp_netaddr.c rtpp_acct_pipe.h \ - $(CMDSRCDIR)/rpcpv1_play.c $(CMDSRCDIR)/rpcpv1_play.h \ - $(CMDSRCDIR)/rpcpv1_ver.h $(CMDSRCDIR)/rpcpv1_ver.c \ - rtpp_pearson_perfect.c rtpp_acct_rtcp.h rtpp_acct_rtcp.c \ - rtpp_cfile.c rtpp_cfile.h rtpp_ucl.c rtpp_ucl.h \ - rtpp_network_io.c rtpp_network_io.h rtpp_wi_pkt.c \ - rtpp_wi_pkt.h rtpp_timeout_data.c rtpp_timeout_data.h \ - rtpp_locking.h rtpp_nofile.c rtpp_nofile.h rtpp_record_adhoc.h \ - $(CMDSRCDIR)/rpcpv1_norecord.c $(CMDSRCDIR)/rpcpv1_norecord.h \ - $(CMDSRCDIR)/rpcpv1_ul_subc.c $(CMDSRCDIR)/rpcpv1_ul_subc.h \ - rtpp_command_rcache.h rtpp_log_obj.h rtpp_port_table.h \ - rtpp_timed_task.h rtpp_modman.h rtpp_module_if.h rtpp_epoll.c \ - rtpp_str.c rtpp_str.h rtpp_sbuf.c rtpp_sbuf.h rtpp_refproxy.c \ - rtpp_command_reply.c $(ADV_DIR)/packet_observer.h \ + rtpp_genuid.c rtpp_proc_util.c rtpp_proc_util.h rtpp_log_obj.c \ + rtpp_socket.c rtpp_wi_apis.c rtpp_wi_apis.h rtpp_ttl.c \ + rtpp_proc_ttl.h rtpp_proc_ttl.c rtpp_pipe.c rtpp_pcount.c \ + rtpp_debug.h rtpp_wi_sgnl.c rtpp_wi_sgnl.h rtpp_wi_data.c \ + rtpp_wi_data.h rtpp_pcnt_strm.c rtpp_endian.h rtpp_ringbuf.c \ + $(CMDSRCDIR)/rpcpv1_delete.c $(CMDSRCDIR)/rpcpv1_delete.h \ + $(CMDSRCDIR)/rpcpv1_record.c $(CMDSRCDIR)/rpcpv1_record.h \ + rtpp_port_table.c rtpp_acct.c rtpp_acct.h rtpp_stats.h \ + rtpp_bindaddrs.c rtpp_bindaddrs.h rtpp_ssrc.h rtpp_netaddr.c \ + rtpp_acct_pipe.h $(CMDSRCDIR)/rpcpv1_play.c \ + $(CMDSRCDIR)/rpcpv1_play.h $(CMDSRCDIR)/rpcpv1_ver.h \ + $(CMDSRCDIR)/rpcpv1_ver.c rtpp_pearson_perfect.c \ + rtpp_acct_rtcp.h rtpp_acct_rtcp.c rtpp_cfile.c rtpp_cfile.h \ + rtpp_ucl.c rtpp_ucl.h rtpp_network_io.c rtpp_network_io.h \ + rtpp_wi_pkt.c rtpp_wi_pkt.h rtpp_timeout_data.c \ + rtpp_timeout_data.h rtpp_locking.h rtpp_nofile.c rtpp_nofile.h \ + rtpp_record_adhoc.h $(CMDSRCDIR)/rpcpv1_norecord.c \ + $(CMDSRCDIR)/rpcpv1_norecord.h $(CMDSRCDIR)/rpcpv1_ul_subc.c \ + $(CMDSRCDIR)/rpcpv1_ul_subc.h rtpp_command_rcache.h \ + rtpp_log_obj.h rtpp_port_table.h rtpp_timed_task.h \ + rtpp_modman.h rtpp_module_if.h rtpp_epoll.c rtpp_str.c \ + rtpp_str.h rtpp_sbuf.c rtpp_sbuf.h rtpp_refproxy.c \ + rtpp_command_reply.c $(CMDSRCDIR)/rpcpv1_ul_subc_set.c \ + $(CMDSRCDIR)/rpcpv1_ul_subc_set.h $(ADV_DIR)/packet_observer.h \ $(ADV_DIR)/pproc_manager.c $(ADV_DIR)/pproc_manager.h \ rtpp_modman.c rtpp_module_if_static.c rtpp_module_if_static.h \ rtpp_module_if.c rtpp_module.h rtpp_log_stand.c \ @@ -782,6 +788,7 @@ am__objects_122 = rtpproxy_debug-main.$(OBJEXT) \ rtpproxy_debug-rtpp_stream.$(OBJEXT) \ rtpproxy_debug-rtpp_proc_wakeup.$(OBJEXT) \ rtpproxy_debug-rtpp_genuid.$(OBJEXT) \ + rtpproxy_debug-rtpp_proc_util.$(OBJEXT) \ rtpproxy_debug-rtpp_log_obj.$(OBJEXT) \ rtpproxy_debug-rtpp_socket.$(OBJEXT) \ rtpproxy_debug-rtpp_wi_apis.$(OBJEXT) \ @@ -816,6 +823,7 @@ am__objects_122 = rtpproxy_debug-main.$(OBJEXT) \ rtpproxy_debug-rtpp_sbuf.$(OBJEXT) \ rtpproxy_debug-rtpp_refproxy.$(OBJEXT) \ rtpproxy_debug-rtpp_command_reply.$(OBJEXT) \ + $(CMDSRCDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.$(OBJEXT) \ $(ADV_DIR)/rtpproxy_debug-pproc_manager.$(OBJEXT) \ rtpproxy_debug-rtpp_modman.$(OBJEXT) \ rtpproxy_debug-rtpp_module_if_static.$(OBJEXT) \ @@ -926,6 +934,7 @@ am__depfiles_remade = \ $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_stats.Plo \ $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ul.Plo \ $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ul_subc.Plo \ + $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ul_subc_set.Plo \ $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ver.Plo \ $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_copy.Po \ $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_delete.Po \ @@ -936,6 +945,7 @@ am__depfiles_remade = \ $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_stats.Po \ $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul.Po \ $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul_subc.Po \ + $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.Po \ $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ver.Po \ $(MAINSRCDIR)/$(DEPDIR)/rtpp_fintest-rtpp_autoglitch.Po \ $(MAINSRCDIR)/$(DEPDIR)/rtpp_fintest-rtpp_coverage.Po \ @@ -1140,6 +1150,7 @@ am__depfiles_remade = \ ./$(DEPDIR)/librtpproxy_la-rtpp_proc_async.Plo \ ./$(DEPDIR)/librtpproxy_la-rtpp_proc_servers.Plo \ ./$(DEPDIR)/librtpproxy_la-rtpp_proc_ttl.Plo \ + ./$(DEPDIR)/librtpproxy_la-rtpp_proc_util.Plo \ ./$(DEPDIR)/librtpproxy_la-rtpp_proc_wakeup.Plo \ ./$(DEPDIR)/librtpproxy_la-rtpp_queue.Plo \ ./$(DEPDIR)/librtpproxy_la-rtpp_record.Plo \ @@ -1255,6 +1266,7 @@ am__depfiles_remade = \ ./$(DEPDIR)/rtpproxy_debug-rtpp_proc_async.Po \ ./$(DEPDIR)/rtpproxy_debug-rtpp_proc_servers.Po \ ./$(DEPDIR)/rtpproxy_debug-rtpp_proc_ttl.Po \ + ./$(DEPDIR)/rtpproxy_debug-rtpp_proc_util.Po \ ./$(DEPDIR)/rtpproxy_debug-rtpp_proc_wakeup.Po \ ./$(DEPDIR)/rtpproxy_debug-rtpp_queue.Po \ ./$(DEPDIR)/rtpproxy_debug-rtpp_record.Po \ @@ -1601,29 +1613,31 @@ BASE_SOURCES = main.c rtp.h rtpp_server.c rtpp_defines.h rtpp_log.h \ rtp_packet.c rtpp_time.c rtpp_time.h rtpp_pcnts_strm.h \ rtpp_runcreds.h rtpp_sessinfo.c rtpp_weakref.c rtpp_rw_lock.c \ rtpp_proc_servers.c rtpp_stream.c rtpp_proc_wakeup.c \ - rtpp_genuid.c rtpp_log_obj.c rtpp_socket.c rtpp_wi_apis.c \ - rtpp_wi_apis.h rtpp_ttl.c rtpp_proc_ttl.h rtpp_proc_ttl.c \ - rtpp_pipe.c rtpp_pcount.c rtpp_debug.h rtpp_wi_sgnl.c \ - rtpp_wi_sgnl.h rtpp_wi_data.c rtpp_wi_data.h rtpp_pcnt_strm.c \ - rtpp_endian.h rtpp_ringbuf.c $(CMDSRCDIR)/rpcpv1_delete.c \ - $(CMDSRCDIR)/rpcpv1_delete.h $(CMDSRCDIR)/rpcpv1_record.c \ - $(CMDSRCDIR)/rpcpv1_record.h rtpp_port_table.c rtpp_acct.c \ - rtpp_acct.h rtpp_stats.h rtpp_bindaddrs.c rtpp_bindaddrs.h \ - rtpp_ssrc.h rtpp_netaddr.c rtpp_acct_pipe.h \ - $(CMDSRCDIR)/rpcpv1_play.c $(CMDSRCDIR)/rpcpv1_play.h \ - $(CMDSRCDIR)/rpcpv1_ver.h $(CMDSRCDIR)/rpcpv1_ver.c \ - rtpp_pearson_perfect.c rtpp_acct_rtcp.h rtpp_acct_rtcp.c \ - rtpp_cfile.c rtpp_cfile.h rtpp_ucl.c rtpp_ucl.h \ - rtpp_network_io.c rtpp_network_io.h rtpp_wi_pkt.c \ - rtpp_wi_pkt.h rtpp_timeout_data.c rtpp_timeout_data.h \ - rtpp_locking.h rtpp_nofile.c rtpp_nofile.h rtpp_record_adhoc.h \ - $(CMDSRCDIR)/rpcpv1_norecord.c $(CMDSRCDIR)/rpcpv1_norecord.h \ - $(CMDSRCDIR)/rpcpv1_ul_subc.c $(CMDSRCDIR)/rpcpv1_ul_subc.h \ - $(RTPP_AUTOSRC_SOURCES) rtpp_epoll.c rtpp_str.c rtpp_str.h \ - rtpp_sbuf.c rtpp_sbuf.h rtpp_refproxy.c rtpp_command_reply.c \ - $(ADV_DIR)/packet_observer.h $(ADV_DIR)/pproc_manager.c \ - $(ADV_DIR)/pproc_manager.h rtpp_modman.c \ - rtpp_module_if_static.c rtpp_module_if_static.h \ + rtpp_genuid.c rtpp_proc_util.c rtpp_proc_util.h rtpp_log_obj.c \ + rtpp_socket.c rtpp_wi_apis.c rtpp_wi_apis.h rtpp_ttl.c \ + rtpp_proc_ttl.h rtpp_proc_ttl.c rtpp_pipe.c rtpp_pcount.c \ + rtpp_debug.h rtpp_wi_sgnl.c rtpp_wi_sgnl.h rtpp_wi_data.c \ + rtpp_wi_data.h rtpp_pcnt_strm.c rtpp_endian.h rtpp_ringbuf.c \ + $(CMDSRCDIR)/rpcpv1_delete.c $(CMDSRCDIR)/rpcpv1_delete.h \ + $(CMDSRCDIR)/rpcpv1_record.c $(CMDSRCDIR)/rpcpv1_record.h \ + rtpp_port_table.c rtpp_acct.c rtpp_acct.h rtpp_stats.h \ + rtpp_bindaddrs.c rtpp_bindaddrs.h rtpp_ssrc.h rtpp_netaddr.c \ + rtpp_acct_pipe.h $(CMDSRCDIR)/rpcpv1_play.c \ + $(CMDSRCDIR)/rpcpv1_play.h $(CMDSRCDIR)/rpcpv1_ver.h \ + $(CMDSRCDIR)/rpcpv1_ver.c rtpp_pearson_perfect.c \ + rtpp_acct_rtcp.h rtpp_acct_rtcp.c rtpp_cfile.c rtpp_cfile.h \ + rtpp_ucl.c rtpp_ucl.h rtpp_network_io.c rtpp_network_io.h \ + rtpp_wi_pkt.c rtpp_wi_pkt.h rtpp_timeout_data.c \ + rtpp_timeout_data.h rtpp_locking.h rtpp_nofile.c rtpp_nofile.h \ + rtpp_record_adhoc.h $(CMDSRCDIR)/rpcpv1_norecord.c \ + $(CMDSRCDIR)/rpcpv1_norecord.h $(CMDSRCDIR)/rpcpv1_ul_subc.c \ + $(CMDSRCDIR)/rpcpv1_ul_subc.h $(RTPP_AUTOSRC_SOURCES) \ + rtpp_epoll.c rtpp_str.c rtpp_str.h rtpp_sbuf.c rtpp_sbuf.h \ + rtpp_refproxy.c rtpp_command_reply.c \ + $(CMDSRCDIR)/rpcpv1_ul_subc_set.c \ + $(CMDSRCDIR)/rpcpv1_ul_subc_set.h $(ADV_DIR)/packet_observer.h \ + $(ADV_DIR)/pproc_manager.c $(ADV_DIR)/pproc_manager.h \ + rtpp_modman.c rtpp_module_if_static.c rtpp_module_if_static.h \ $(am__append_5) $(am__append_8) $(am__append_9) rtpproxy_LDADD = librtpproxy.la -lm -lpthread $(am__append_6) \ $(am__append_10) @@ -1892,6 +1906,9 @@ $(CMDSRCDIR)/librtpproxy_la-rpcpv1_norecord.lo: \ $(CMDSRCDIR)/librtpproxy_la-rpcpv1_ul_subc.lo: \ $(CMDSRCDIR)/$(am__dirstamp) \ $(CMDSRCDIR)/$(DEPDIR)/$(am__dirstamp) +$(CMDSRCDIR)/librtpproxy_la-rpcpv1_ul_subc_set.lo: \ + $(CMDSRCDIR)/$(am__dirstamp) \ + $(CMDSRCDIR)/$(DEPDIR)/$(am__dirstamp) $(ADV_DIR)/$(am__dirstamp): @$(MKDIR_P) $(ADV_DIR) @: >>$(ADV_DIR)/$(am__dirstamp) @@ -2330,6 +2347,9 @@ $(CMDSRCDIR)/rtpproxy_debug-rpcpv1_norecord.$(OBJEXT): \ $(CMDSRCDIR)/rtpproxy_debug-rpcpv1_ul_subc.$(OBJEXT): \ $(CMDSRCDIR)/$(am__dirstamp) \ $(CMDSRCDIR)/$(DEPDIR)/$(am__dirstamp) +$(CMDSRCDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.$(OBJEXT): \ + $(CMDSRCDIR)/$(am__dirstamp) \ + $(CMDSRCDIR)/$(DEPDIR)/$(am__dirstamp) $(ADV_DIR)/rtpproxy_debug-pproc_manager.$(OBJEXT): \ $(ADV_DIR)/$(am__dirstamp) \ $(ADV_DIR)/$(DEPDIR)/$(am__dirstamp) @@ -2476,6 +2496,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@$(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_stats.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ul.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ul_subc.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@$(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ul_subc_set.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ver.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_copy.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_delete.Po@am__quote@ # am--include-marker @@ -2486,6 +2507,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@$(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_stats.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul_subc.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@$(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ver.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(MAINSRCDIR)/$(DEPDIR)/rtpp_fintest-rtpp_autoglitch.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(MAINSRCDIR)/$(DEPDIR)/rtpp_fintest-rtpp_coverage.Po@am__quote@ # am--include-marker @@ -2690,6 +2712,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librtpproxy_la-rtpp_proc_async.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librtpproxy_la-rtpp_proc_servers.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librtpproxy_la-rtpp_proc_ttl.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librtpproxy_la-rtpp_proc_util.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librtpproxy_la-rtpp_proc_wakeup.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librtpproxy_la-rtpp_queue.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librtpproxy_la-rtpp_record.Plo@am__quote@ # am--include-marker @@ -2805,6 +2828,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpproxy_debug-rtpp_proc_async.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpproxy_debug-rtpp_proc_servers.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpproxy_debug-rtpp_proc_ttl.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpproxy_debug-rtpp_proc_util.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpproxy_debug-rtpp_proc_wakeup.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpproxy_debug-rtpp_queue.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpproxy_debug-rtpp_record.Po@am__quote@ # am--include-marker @@ -3143,6 +3167,13 @@ librtpproxy_la-rtpp_genuid.lo: rtpp_genuid.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librtpproxy_la_CPPFLAGS) $(CPPFLAGS) $(librtpproxy_la_CFLAGS) $(CFLAGS) -c -o librtpproxy_la-rtpp_genuid.lo `test -f 'rtpp_genuid.c' || echo '$(srcdir)/'`rtpp_genuid.c +librtpproxy_la-rtpp_proc_util.lo: rtpp_proc_util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librtpproxy_la_CPPFLAGS) $(CPPFLAGS) $(librtpproxy_la_CFLAGS) $(CFLAGS) -MT librtpproxy_la-rtpp_proc_util.lo -MD -MP -MF $(DEPDIR)/librtpproxy_la-rtpp_proc_util.Tpo -c -o librtpproxy_la-rtpp_proc_util.lo `test -f 'rtpp_proc_util.c' || echo '$(srcdir)/'`rtpp_proc_util.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librtpproxy_la-rtpp_proc_util.Tpo $(DEPDIR)/librtpproxy_la-rtpp_proc_util.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rtpp_proc_util.c' object='librtpproxy_la-rtpp_proc_util.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librtpproxy_la_CPPFLAGS) $(CPPFLAGS) $(librtpproxy_la_CFLAGS) $(CFLAGS) -c -o librtpproxy_la-rtpp_proc_util.lo `test -f 'rtpp_proc_util.c' || echo '$(srcdir)/'`rtpp_proc_util.c + librtpproxy_la-rtpp_log_obj.lo: rtpp_log_obj.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librtpproxy_la_CPPFLAGS) $(CPPFLAGS) $(librtpproxy_la_CFLAGS) $(CFLAGS) -MT librtpproxy_la-rtpp_log_obj.lo -MD -MP -MF $(DEPDIR)/librtpproxy_la-rtpp_log_obj.Tpo -c -o librtpproxy_la-rtpp_log_obj.lo `test -f 'rtpp_log_obj.c' || echo '$(srcdir)/'`rtpp_log_obj.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librtpproxy_la-rtpp_log_obj.Tpo $(DEPDIR)/librtpproxy_la-rtpp_log_obj.Plo @@ -3381,6 +3412,13 @@ librtpproxy_la-rtpp_command_reply.lo: rtpp_command_reply.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librtpproxy_la_CPPFLAGS) $(CPPFLAGS) $(librtpproxy_la_CFLAGS) $(CFLAGS) -c -o librtpproxy_la-rtpp_command_reply.lo `test -f 'rtpp_command_reply.c' || echo '$(srcdir)/'`rtpp_command_reply.c +$(CMDSRCDIR)/librtpproxy_la-rpcpv1_ul_subc_set.lo: $(CMDSRCDIR)/rpcpv1_ul_subc_set.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librtpproxy_la_CPPFLAGS) $(CPPFLAGS) $(librtpproxy_la_CFLAGS) $(CFLAGS) -MT $(CMDSRCDIR)/librtpproxy_la-rpcpv1_ul_subc_set.lo -MD -MP -MF $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ul_subc_set.Tpo -c -o $(CMDSRCDIR)/librtpproxy_la-rpcpv1_ul_subc_set.lo `test -f '$(CMDSRCDIR)/rpcpv1_ul_subc_set.c' || echo '$(srcdir)/'`$(CMDSRCDIR)/rpcpv1_ul_subc_set.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ul_subc_set.Tpo $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ul_subc_set.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(CMDSRCDIR)/rpcpv1_ul_subc_set.c' object='$(CMDSRCDIR)/librtpproxy_la-rpcpv1_ul_subc_set.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librtpproxy_la_CPPFLAGS) $(CPPFLAGS) $(librtpproxy_la_CFLAGS) $(CFLAGS) -c -o $(CMDSRCDIR)/librtpproxy_la-rpcpv1_ul_subc_set.lo `test -f '$(CMDSRCDIR)/rpcpv1_ul_subc_set.c' || echo '$(srcdir)/'`$(CMDSRCDIR)/rpcpv1_ul_subc_set.c + $(ADV_DIR)/librtpproxy_la-pproc_manager.lo: $(ADV_DIR)/pproc_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librtpproxy_la_CPPFLAGS) $(CPPFLAGS) $(librtpproxy_la_CFLAGS) $(CFLAGS) -MT $(ADV_DIR)/librtpproxy_la-pproc_manager.lo -MD -MP -MF $(ADV_DIR)/$(DEPDIR)/librtpproxy_la-pproc_manager.Tpo -c -o $(ADV_DIR)/librtpproxy_la-pproc_manager.lo `test -f '$(ADV_DIR)/pproc_manager.c' || echo '$(srcdir)/'`$(ADV_DIR)/pproc_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(ADV_DIR)/$(DEPDIR)/librtpproxy_la-pproc_manager.Tpo $(ADV_DIR)/$(DEPDIR)/librtpproxy_la-pproc_manager.Plo @@ -6265,6 +6303,20 @@ rtpproxy_debug-rtpp_genuid.obj: rtpp_genuid.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rtpproxy_debug_CPPFLAGS) $(CPPFLAGS) $(rtpproxy_debug_CFLAGS) $(CFLAGS) -c -o rtpproxy_debug-rtpp_genuid.obj `if test -f 'rtpp_genuid.c'; then $(CYGPATH_W) 'rtpp_genuid.c'; else $(CYGPATH_W) '$(srcdir)/rtpp_genuid.c'; fi` +rtpproxy_debug-rtpp_proc_util.o: rtpp_proc_util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rtpproxy_debug_CPPFLAGS) $(CPPFLAGS) $(rtpproxy_debug_CFLAGS) $(CFLAGS) -MT rtpproxy_debug-rtpp_proc_util.o -MD -MP -MF $(DEPDIR)/rtpproxy_debug-rtpp_proc_util.Tpo -c -o rtpproxy_debug-rtpp_proc_util.o `test -f 'rtpp_proc_util.c' || echo '$(srcdir)/'`rtpp_proc_util.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rtpproxy_debug-rtpp_proc_util.Tpo $(DEPDIR)/rtpproxy_debug-rtpp_proc_util.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rtpp_proc_util.c' object='rtpproxy_debug-rtpp_proc_util.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rtpproxy_debug_CPPFLAGS) $(CPPFLAGS) $(rtpproxy_debug_CFLAGS) $(CFLAGS) -c -o rtpproxy_debug-rtpp_proc_util.o `test -f 'rtpp_proc_util.c' || echo '$(srcdir)/'`rtpp_proc_util.c + +rtpproxy_debug-rtpp_proc_util.obj: rtpp_proc_util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rtpproxy_debug_CPPFLAGS) $(CPPFLAGS) $(rtpproxy_debug_CFLAGS) $(CFLAGS) -MT rtpproxy_debug-rtpp_proc_util.obj -MD -MP -MF $(DEPDIR)/rtpproxy_debug-rtpp_proc_util.Tpo -c -o rtpproxy_debug-rtpp_proc_util.obj `if test -f 'rtpp_proc_util.c'; then $(CYGPATH_W) 'rtpp_proc_util.c'; else $(CYGPATH_W) '$(srcdir)/rtpp_proc_util.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rtpproxy_debug-rtpp_proc_util.Tpo $(DEPDIR)/rtpproxy_debug-rtpp_proc_util.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rtpp_proc_util.c' object='rtpproxy_debug-rtpp_proc_util.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rtpproxy_debug_CPPFLAGS) $(CPPFLAGS) $(rtpproxy_debug_CFLAGS) $(CFLAGS) -c -o rtpproxy_debug-rtpp_proc_util.obj `if test -f 'rtpp_proc_util.c'; then $(CYGPATH_W) 'rtpp_proc_util.c'; else $(CYGPATH_W) '$(srcdir)/rtpp_proc_util.c'; fi` + rtpproxy_debug-rtpp_log_obj.o: rtpp_log_obj.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rtpproxy_debug_CPPFLAGS) $(CPPFLAGS) $(rtpproxy_debug_CFLAGS) $(CFLAGS) -MT rtpproxy_debug-rtpp_log_obj.o -MD -MP -MF $(DEPDIR)/rtpproxy_debug-rtpp_log_obj.Tpo -c -o rtpproxy_debug-rtpp_log_obj.o `test -f 'rtpp_log_obj.c' || echo '$(srcdir)/'`rtpp_log_obj.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rtpproxy_debug-rtpp_log_obj.Tpo $(DEPDIR)/rtpproxy_debug-rtpp_log_obj.Po @@ -6741,6 +6793,20 @@ rtpproxy_debug-rtpp_command_reply.obj: rtpp_command_reply.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rtpproxy_debug_CPPFLAGS) $(CPPFLAGS) $(rtpproxy_debug_CFLAGS) $(CFLAGS) -c -o rtpproxy_debug-rtpp_command_reply.obj `if test -f 'rtpp_command_reply.c'; then $(CYGPATH_W) 'rtpp_command_reply.c'; else $(CYGPATH_W) '$(srcdir)/rtpp_command_reply.c'; fi` +$(CMDSRCDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.o: $(CMDSRCDIR)/rpcpv1_ul_subc_set.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rtpproxy_debug_CPPFLAGS) $(CPPFLAGS) $(rtpproxy_debug_CFLAGS) $(CFLAGS) -MT $(CMDSRCDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.o -MD -MP -MF $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.Tpo -c -o $(CMDSRCDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.o `test -f '$(CMDSRCDIR)/rpcpv1_ul_subc_set.c' || echo '$(srcdir)/'`$(CMDSRCDIR)/rpcpv1_ul_subc_set.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.Tpo $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(CMDSRCDIR)/rpcpv1_ul_subc_set.c' object='$(CMDSRCDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rtpproxy_debug_CPPFLAGS) $(CPPFLAGS) $(rtpproxy_debug_CFLAGS) $(CFLAGS) -c -o $(CMDSRCDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.o `test -f '$(CMDSRCDIR)/rpcpv1_ul_subc_set.c' || echo '$(srcdir)/'`$(CMDSRCDIR)/rpcpv1_ul_subc_set.c + +$(CMDSRCDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.obj: $(CMDSRCDIR)/rpcpv1_ul_subc_set.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rtpproxy_debug_CPPFLAGS) $(CPPFLAGS) $(rtpproxy_debug_CFLAGS) $(CFLAGS) -MT $(CMDSRCDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.obj -MD -MP -MF $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.Tpo -c -o $(CMDSRCDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.obj `if test -f '$(CMDSRCDIR)/rpcpv1_ul_subc_set.c'; then $(CYGPATH_W) '$(CMDSRCDIR)/rpcpv1_ul_subc_set.c'; else $(CYGPATH_W) '$(srcdir)/$(CMDSRCDIR)/rpcpv1_ul_subc_set.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.Tpo $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(CMDSRCDIR)/rpcpv1_ul_subc_set.c' object='$(CMDSRCDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rtpproxy_debug_CPPFLAGS) $(CPPFLAGS) $(rtpproxy_debug_CFLAGS) $(CFLAGS) -c -o $(CMDSRCDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.obj `if test -f '$(CMDSRCDIR)/rpcpv1_ul_subc_set.c'; then $(CYGPATH_W) '$(CMDSRCDIR)/rpcpv1_ul_subc_set.c'; else $(CYGPATH_W) '$(srcdir)/$(CMDSRCDIR)/rpcpv1_ul_subc_set.c'; fi` + $(ADV_DIR)/rtpproxy_debug-pproc_manager.o: $(ADV_DIR)/pproc_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rtpproxy_debug_CPPFLAGS) $(CPPFLAGS) $(rtpproxy_debug_CFLAGS) $(CFLAGS) -MT $(ADV_DIR)/rtpproxy_debug-pproc_manager.o -MD -MP -MF $(ADV_DIR)/$(DEPDIR)/rtpproxy_debug-pproc_manager.Tpo -c -o $(ADV_DIR)/rtpproxy_debug-pproc_manager.o `test -f '$(ADV_DIR)/pproc_manager.c' || echo '$(srcdir)/'`$(ADV_DIR)/pproc_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(ADV_DIR)/$(DEPDIR)/rtpproxy_debug-pproc_manager.Tpo $(ADV_DIR)/$(DEPDIR)/rtpproxy_debug-pproc_manager.Po @@ -7530,6 +7596,7 @@ distclean: distclean-am -rm -f $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_stats.Plo -rm -f $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ul.Plo -rm -f $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ul_subc.Plo + -rm -f $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ul_subc_set.Plo -rm -f $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ver.Plo -rm -f $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_copy.Po -rm -f $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_delete.Po @@ -7540,6 +7607,7 @@ distclean: distclean-am -rm -f $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_stats.Po -rm -f $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul.Po -rm -f $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul_subc.Po + -rm -f $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.Po -rm -f $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ver.Po -rm -f $(MAINSRCDIR)/$(DEPDIR)/rtpp_fintest-rtpp_autoglitch.Po -rm -f $(MAINSRCDIR)/$(DEPDIR)/rtpp_fintest-rtpp_coverage.Po @@ -7744,6 +7812,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/librtpproxy_la-rtpp_proc_async.Plo -rm -f ./$(DEPDIR)/librtpproxy_la-rtpp_proc_servers.Plo -rm -f ./$(DEPDIR)/librtpproxy_la-rtpp_proc_ttl.Plo + -rm -f ./$(DEPDIR)/librtpproxy_la-rtpp_proc_util.Plo -rm -f ./$(DEPDIR)/librtpproxy_la-rtpp_proc_wakeup.Plo -rm -f ./$(DEPDIR)/librtpproxy_la-rtpp_queue.Plo -rm -f ./$(DEPDIR)/librtpproxy_la-rtpp_record.Plo @@ -7859,6 +7928,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/rtpproxy_debug-rtpp_proc_async.Po -rm -f ./$(DEPDIR)/rtpproxy_debug-rtpp_proc_servers.Po -rm -f ./$(DEPDIR)/rtpproxy_debug-rtpp_proc_ttl.Po + -rm -f ./$(DEPDIR)/rtpproxy_debug-rtpp_proc_util.Po -rm -f ./$(DEPDIR)/rtpproxy_debug-rtpp_proc_wakeup.Po -rm -f ./$(DEPDIR)/rtpproxy_debug-rtpp_queue.Po -rm -f ./$(DEPDIR)/rtpproxy_debug-rtpp_record.Po @@ -7942,6 +8012,7 @@ maintainer-clean: maintainer-clean-am -rm -f $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_stats.Plo -rm -f $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ul.Plo -rm -f $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ul_subc.Plo + -rm -f $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ul_subc_set.Plo -rm -f $(CMDSRCDIR)/$(DEPDIR)/librtpproxy_la-rpcpv1_ver.Plo -rm -f $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_copy.Po -rm -f $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_delete.Po @@ -7952,6 +8023,7 @@ maintainer-clean: maintainer-clean-am -rm -f $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_stats.Po -rm -f $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul.Po -rm -f $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul_subc.Po + -rm -f $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ul_subc_set.Po -rm -f $(CMDSRCDIR)/$(DEPDIR)/rtpproxy_debug-rpcpv1_ver.Po -rm -f $(MAINSRCDIR)/$(DEPDIR)/rtpp_fintest-rtpp_autoglitch.Po -rm -f $(MAINSRCDIR)/$(DEPDIR)/rtpp_fintest-rtpp_coverage.Po @@ -8156,6 +8228,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/librtpproxy_la-rtpp_proc_async.Plo -rm -f ./$(DEPDIR)/librtpproxy_la-rtpp_proc_servers.Plo -rm -f ./$(DEPDIR)/librtpproxy_la-rtpp_proc_ttl.Plo + -rm -f ./$(DEPDIR)/librtpproxy_la-rtpp_proc_util.Plo -rm -f ./$(DEPDIR)/librtpproxy_la-rtpp_proc_wakeup.Plo -rm -f ./$(DEPDIR)/librtpproxy_la-rtpp_queue.Plo -rm -f ./$(DEPDIR)/librtpproxy_la-rtpp_record.Plo @@ -8271,6 +8344,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/rtpproxy_debug-rtpp_proc_async.Po -rm -f ./$(DEPDIR)/rtpproxy_debug-rtpp_proc_servers.Po -rm -f ./$(DEPDIR)/rtpproxy_debug-rtpp_proc_ttl.Po + -rm -f ./$(DEPDIR)/rtpproxy_debug-rtpp_proc_util.Po -rm -f ./$(DEPDIR)/rtpproxy_debug-rtpp_proc_wakeup.Po -rm -f ./$(DEPDIR)/rtpproxy_debug-rtpp_queue.Po -rm -f ./$(DEPDIR)/rtpproxy_debug-rtpp_record.Po diff --git a/src/config.h.in b/src/config.h.in index 17e094db2..5950636ce 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -57,6 +57,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H +/* Define to 1 if you have the declaration of 'optreset', and to 0 if you + don't. */ +#undef HAVE_DECL_OPTRESET + /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H diff --git a/tests/Makefile.in b/tests/Makefile.in index 72efffd24..6deb00ae2 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -113,6 +113,7 @@ host_triplet = @host@ @ENABLE_BASIC_TESTS_TRUE@ session_timeouts/notify_tcp \ @ENABLE_BASIC_TESTS_TRUE@ session_timeouts/notify_tcp_wild \ @ENABLE_BASIC_TESTS_TRUE@ session_timeouts/notify_unix \ +@ENABLE_BASIC_TESTS_TRUE@ session_timeouts/set_ttl \ @ENABLE_BASIC_TESTS_TRUE@ playback/playback1 @ENABLE_BASIC_TESTS_TRUE@am__append_2 = ${autosrc_CLEANFILES} \ @ENABLE_BASIC_TESTS_TRUE@ ${recording_CLEANFILES} \