rename mediaproxy-ng to rtpengine

pull/6/head
Richard Fuchs 12 years ago
parent f8f741b584
commit 4c0ca278fa

3
daemon/.gitignore vendored

@ -1,5 +1,6 @@
.depend
*.o
mediaproxy-ng
rtpengine
core
core.*
.ycm_extra_conf.pyc

@ -23,7 +23,7 @@ flags = [
'-D_GNU_SOURCE',
'-D__DEBUG=1',
'-DMEDIAPROXY_VERSION="dummy"',
'-DMP_PLUGIN_DIR="/usr/lib/mediaproxy-ng"',
'-DMP_PLUGIN_DIR="/usr/lib/rtpengine"',
'-O2',
'-fstack-protector',
'--param=ssp-buffer-size=4',

@ -17,7 +17,7 @@ else
CFLAGS+= -DMEDIAPROXY_VERSION="\"undefined\""
endif
endif
CFLAGS+= -DMP_PLUGIN_DIR="\"/usr/lib/mediaproxy-ng\""
CFLAGS+= -DMP_PLUGIN_DIR="\"/usr/lib/rtpengine\""
#CFLAGS+= -DSRTCP_KEY_DERIVATION_RFC_COMPLIANCE
@ -54,7 +54,7 @@ OBJS= $(SRCS:.c=.o)
.PHONY: all dep clean tests debug
all:
$(MAKE) mediaproxy-ng
$(MAKE) rtpengine
debug:
$(MAKE) DBG=yes all
@ -62,12 +62,12 @@ debug:
dep: .depend
clean:
rm -f $(OBJS) mediaproxy-ng .depend core
rm -f $(OBJS) rtpengine .depend core
.depend: $(SRCS) Makefile
$(CC) $(CFLAGS) -M $(SRCS) | sed -e 's/:/ .depend:/' > .depend
mediaproxy-ng: $(OBJS) .depend
rtpengine: $(OBJS) .depend
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS)

@ -13,7 +13,7 @@
# define BENCODE_FREE pkg_free
# endif
#else
/* mediaproxy-ng */
/* rtpengine */
# include "str.h"
# ifndef BENCODE_MALLOC
# define BENCODE_MALLOC malloc

@ -900,14 +900,14 @@ retry:
for (i = 0; i < 100; i++)
close(i);
openlog("mediaproxy-ng/child", LOG_PID | LOG_NDELAY, LOG_DAEMON);
openlog("rtpengine/child", LOG_PID | LOG_NDELAY, LOG_DAEMON);
ilog(LOG_INFO, "Initiating XMLRPC call for tag "STR_FORMAT"", STR_FMT(tag));
alarm(5);
xmlrpc_env_init(&e);
xmlrpc_client_setup_global_const(&e);
xmlrpc_client_create(&e, XMLRPC_CLIENT_NO_FLAGS, "ngcp-mediaproxy-ng", MEDIAPROXY_VERSION,
xmlrpc_client_create(&e, XMLRPC_CLIENT_NO_FLAGS, "ngcp-rtpengine", MEDIAPROXY_VERSION,
NULL, 0, &c);
if (e.fault_occurred)
goto fault;

@ -170,7 +170,7 @@ static int cert_init() {
/* common name */
if (!X509_NAME_add_entry_by_NID(name, NID_commonName, MBSTRING_UTF8,
(unsigned char *) "mediaproxy-ng", -1, -1, 0))
(unsigned char *) "rtpengine", -1, -1, 0))
goto err;
if (!X509_set_subject_name(x509, name))

@ -362,7 +362,7 @@ static void init_everything() {
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL);
#endif
openlog("mediaproxy-ng", LOG_PID | LOG_NDELAY, LOG_DAEMON);
openlog("rtpengine", LOG_PID | LOG_NDELAY, LOG_DAEMON);
signals();
resources();
sdp_init();

3
debian/changelog vendored

@ -1,5 +1,6 @@
ngcp-mediaproxy-ng (2.9.9) unstable; urgency=low
ngcp-rtpengine (2.9.9) unstable; urgency=low
* Rename from mediaproxy-ng to rtpengine
* Complete rewrite of internal media streams handling
* Support for DTLS-SRTP
* Support for unBUNDLE

56
debian/control vendored

@ -1,4 +1,4 @@
Source: ngcp-mediaproxy-ng
Source: ngcp-rtpengine
Section: net
Priority: extra
Maintainer: Sipwise Development Team <support@sipwise.com>
@ -15,69 +15,83 @@ Build-Depends: debhelper (>= 5),
Standards-Version: 3.9.3
Homepage: http://sipwise.com/
Package: ngcp-mediaproxy-ng-daemon
Package: ngcp-rtpengine-daemon
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}
Conflicts: ngcp-mediaproxy-ng-daemon
Replaces: ngcp-mediaproxy-ng-daemon
Description: Proxy for RTP and media streams used in NGCP, userspace part.
This daemon handles the first stages of proxying media streams and talks to
the kernel part of the proxy for eventual high-performance packet forwarding.
Package: ngcp-mediaproxy-ng-iptables
Package: ngcp-rtpengine-iptables
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}
Conflicts: ngcp-mediaproxy-ng-iptables
Replaces: ngcp-mediaproxy-ng-iptables
Description: IPtables extension module for the kernel-space NGCP media proxy.
Provides the IPtables extension needed to configure the mediaproxy rule.
Package: ngcp-mediaproxy-ng
Package: ngcp-rtpengine
Architecture: all
Depends: ngcp-mediaproxy-ng-daemon (>= ${source:Version}),
ngcp-mediaproxy-ng-iptables (>= ${source:Version}),
ngcp-mediaproxy-ng-kernel-dkms (>= ${source:Version})
Depends: ngcp-rtpengine-daemon (>= ${source:Version}),
ngcp-rtpengine-iptables (>= ${source:Version}),
ngcp-rtpengine-kernel-dkms (>= ${source:Version})
Conflicts: ngcp-mediaproxy-ng
Replaces: ngcp-mediaproxy-ng
Description: NGCP RTP/media proxy - meta package.
This is a meta package for easy installation of all three parts of the NGCP
media proxy. It will install the user-space daemon, the kernel-space IPtables
module, and the IPtables extension module.
Package: ngcp-mediaproxy-ng-kernel-source
Package: ngcp-rtpengine-kernel-source
Architecture: all
Depends: debhelper (>= 5), module-assistant, ${misc:Depends}
Conflicts: ngcp-mediaproxy-ng-kernel-source
Replaces: ngcp-mediaproxy-ng-kernel-source
Description: IPtables kernel module for the NGCP media proxy - source.
Provides the kernel-space part of the NGCP media proxy for high-
performance packet forwarding.
This package contains the source to be built with module-assistant or
kernel-package.
Package: ngcp-mediaproxy-ng-kernel-dkms
Package: ngcp-rtpengine-kernel-dkms
Architecture: all
Depends: dkms (>= 1.95), ${misc:Depends}
Conflicts: ngcp-mediaproxy-ng-kernel-dkms
Replaces: ngcp-mediaproxy-ng-kernel-dkms
Description: IPtables kernel module for the NGCP media proxy - DKMS.
Provides the kernel-space part of the NGCP media proxy for high-
performance packet forwarding.
This package contains the source to be built with dkms.
Package: ngcp-mediaproxy-ng-dev
Package: ngcp-rtpengine-dev
Architecture: all
Section: libdevel
Depends: ${misc:Depends}
Description: Development files for mediaproxy-ng
This package provides the header files of the mediaproxy-ng
Conflicts: ngcp-mediaproxy-ng-dev
Replaces: ngcp-mediaproxy-ng-dev
Description: Development files for rtpengine
This package provides the header files of the rtpengine
software.
.
Install this package if you wish to develop your own programs using
mediaproxy-ng.
rtpengine.
Package: ngcp-mediaproxy-ng-dbg
Package: ngcp-rtpengine-dbg
Architecture: any
Section: debug
Depends: ngcp-mediaproxy-ng-daemon (= ${binary:Version}),
ngcp-mediaproxy-ng-iptables (= ${binary:Version}),
Depends: ngcp-rtpengine-daemon (= ${binary:Version}),
ngcp-rtpengine-iptables (= ${binary:Version}),
${misc:Depends}
Description: debugging symbols for ngcp-mediaproxy-ng
The ngcp-mediaproxy-ng daemon handles the first stages of proxying media streams and talks to
Conflicts: ngcp-mediaproxy-ng-dbg
Replaces: ngcp-mediaproxy-ng-dbg
Description: debugging symbols for ngcp-rtpengine
The ngcp-rtpengine daemon handles the first stages of proxying media streams and talks to
the kernel part of the proxy for eventual high-performance packet forwarding.
.
ngcp-mediaproxy-ng-iptables provides the IPtables extension needed
ngcp-rtpengine-iptables provides the IPtables extension needed
to configure the mediaproxy rule.
.
This package contains the debugging symbols for ngcp-mediaproxy-ng-daemon
and ngcp-mediaproxy-ng-iptables
This package contains the debugging symbols for ngcp-rtpengine-daemon
and ngcp-rtpengine-iptables

@ -1,4 +1,4 @@
Source: ngcp-mediaproxy-ng-kernel
Source: ngcp-rtpengine-kernel
Section: kernel
Priority: optional
Maintainer: Sipwise Development Team <support@sipwise.com>
@ -6,10 +6,10 @@ Build-Depends: debhelper (>= 5)
Standards-Version: 3.9.3
Homepage: http://sipwise.com/
Package: ngcp-mediaproxy-ng-kernel-modules-_KVERS_
Package: ngcp-rtpengine-kernel-modules-_KVERS_
Architecture: any
Depends: linux-modules-_KVERS_ | linux-image-_KVERS_
Provides: ngcp-mediaproxy-ng-kernel
Provides: ngcp-rtpengine-kernel
Description: TODO
This package provides the ngcp-mediaproxy-ng module for
This package provides the ngcp-rtpengine module for
the Linux kernel version _KVERS_.

@ -1,4 +1,4 @@
PACKAGE_NAME="ngcp-mediaproxy-ng"
PACKAGE_NAME="ngcp-rtpengine"
PACKAGE_VERSION="__VERSION__"
MAKE[0]="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build MEDIAPROXY_VERSION=\"__VERSION__\""
CLEAN="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build clean"

@ -1 +0,0 @@
daemon/mediaproxy-ng /usr/sbin/

@ -1 +0,0 @@
daemon/*.h /usr/include/mediaproxy-ng/

@ -8,7 +8,7 @@ LISTEN_NG=22222
# ADV_ADDRESS_IPV6=...
TIMEOUT=60
SILENT_TIMEOUT=3600
PIDFILE=/var/run/ngcp-mediaproxy-ng-daemon.pid
PIDFILE=/var/run/ngcp-rtpengine-daemon.pid
FORK=yes
# TOS=184
TABLE=0

@ -1,6 +1,6 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: ngcp-mediaproxy-ng-daemon
# Provides: ngcp-rtpengine-daemon
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
@ -11,7 +11,7 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
NAME=ngcp-mediaproxy-ng-daemon
NAME=ngcp-rtpengine-daemon
DESC="RTP/media proxy"
RUN_MEDIAPROXY=no
TABLE=0
@ -21,7 +21,7 @@ case $(dirname $0) in
*) FULLPATH=$(pwd)/$(dirname $0);;
esac
DAEMON=`which mediaproxy-ng`
DAEMON=`which rtpengine`
DEFAULTS=/etc/default/${NAME}
test -f $DAEMON || exit 0
@ -32,10 +32,10 @@ if [ -f $DEFAULTS ]; then
fi
if [ "$RUN_MEDIAPROXY" != "yes" ]; then
echo "mediaproxy-ng not yet configured. Edit $DEFAULTS first."
echo "rtpengine not yet configured. Edit $DEFAULTS first."
exit 0
fi
[ -z "$PIDFILE" ] && PIDFILE="/var/run/mediaproxy-ng.pid"
[ -z "$PIDFILE" ] && PIDFILE="/var/run/rtpengine.pid"
set -e

@ -0,0 +1 @@
daemon/rtpengine /usr/sbin/

@ -1,22 +1,22 @@
#!/bin/sh
# postinst script for ngcp-mediaproxy-ng-daemon
# postinst script for ngcp-rtpengine-daemon
set -e
restart_handler() {
if [ -x "/etc/init.d/ngcp-mediaproxy-ng-daemon" ]; then
if [ -x "/etc/init.d/ngcp-rtpengine-daemon" ]; then
if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then
invoke-rc.d ngcp-mediaproxy-ng-daemon restart || exit $?
invoke-rc.d ngcp-rtpengine-daemon restart || exit $?
else
/etc/init.d/ngcp-mediaproxy-ng-daemon restart || exit $?
/etc/init.d/ngcp-rtpengine-daemon restart || exit $?
fi
fi
}
initscript_handler() {
if [ -x "/etc/init.d/ngcp-mediaproxy-ng-daemon" ]; then
update-rc.d ngcp-mediaproxy-ng-daemon defaults >/dev/null
invoke-rc.d ngcp-mediaproxy-ng-daemon start || exit $?
if [ -x "/etc/init.d/ngcp-rtpengine-daemon" ]; then
update-rc.d ngcp-rtpengine-daemon defaults >/dev/null
invoke-rc.d ngcp-rtpengine-daemon start || exit $?
fi
}
@ -29,10 +29,10 @@ init_handler() {
initscript_handler
else # do not restart daemon on inactive node in pro systems
if ngcp-check_active ; then
echo "Active node detected, restarting ngcp-mediaproxy-ng-daemon"
echo "Active node detected, restarting ngcp-rtpengine-daemon"
restart_handler
else
echo "Inactive node detected, ignoring request to restart ngcp-mediaproxy-ng-daemon"
echo "Inactive node detected, ignoring request to restart ngcp-rtpengine-daemon"
fi
fi
}

@ -1,5 +1,5 @@
#!/bin/sh
# postrm script for ngcp-mediaproxy-ng-daemon
# postrm script for ngcp-rtpengine-daemon
set -e
@ -7,7 +7,7 @@ removal_wrapper() {
# remove the init script only on ce systems, as the
# the pro system handle it inside the monitoring/HA setup
if ! [ -x "$(which ngcp-check_active 2>/dev/null)" ]; then
update-rc.d ngcp-mediaproxy-ng-daemon remove >/dev/null
update-rc.d ngcp-rtpengine-daemon remove >/dev/null
fi
}

@ -1,11 +1,11 @@
#!/bin/sh
# prerm script for ngcp-mediaproxy-ng-daemon
# prerm script for ngcp-rtpengine-daemon
set -e
stop_handler() {
if [ -x "/etc/init.d/ngcp-mediaproxy-ng-daemon" ]; then
invoke-rc.d ngcp-mediaproxy-ng-daemon stop || exit $?
if [ -x "/etc/init.d/ngcp-rtpengine-daemon" ]; then
invoke-rc.d ngcp-rtpengine-daemon stop || exit $?
fi
}
@ -17,7 +17,7 @@ stop_daemon() {
else
case "$2" in
upgrade)
echo "Detected upgrade procedure, not stopping ngcp-mediaproxy-ng-daemon service."
echo "Detected upgrade procedure, not stopping ngcp-rtpengine-daemon service."
;;
remove|purge)
stop_handler

@ -0,0 +1 @@
daemon/*.h /usr/include/rtpengine/

@ -2,8 +2,8 @@
set -e
package=ngcp-mediaproxy-ng-kernel-dkms
name=ngcp-mediaproxy-ng
package=ngcp-rtpengine-kernel-dkms
name=ngcp-rtpengine
version=`dpkg-query -W -f='${Version}' "$package" \
|rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n"`
@ -18,8 +18,8 @@ if [ "$1" = 'configure' ] ; then
dkms build -m "$name" -v "$version" && dkms install -m "$name" -v "$version" || true
# try to start the daemon
if [ -x /etc/init.d/ngcp-mediaproxy-ng-daemon ] ; then
invoke-rc.d ngcp-mediaproxy-ng-daemon restart || true
if [ -x /etc/init.d/ngcp-rtpengine-daemon ] ; then
invoke-rc.d ngcp-rtpengine-daemon restart || true
fi
fi

@ -2,15 +2,15 @@
set -e
package=ngcp-mediaproxy-ng-kernel-dkms
name=ngcp-mediaproxy-ng
package=ngcp-rtpengine-kernel-dkms
name=ngcp-rtpengine
version=`dpkg-query -W -f='${Version}' "$package" \
|rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n"`
# make sure it's not running
if [ -x /etc/init.d/ngcp-mediaproxy-ng-daemon ] ; then
invoke-rc.d ngcp-mediaproxy-ng-daemon stop || true
if [ -x /etc/init.d/ngcp-rtpengine-daemon ] ; then
invoke-rc.d ngcp-rtpengine-daemon stop || true
fi
dkms remove -m "$name" -v "$version" --all || true

@ -1 +1 @@
/usr/share/modass/packages/default.sh /usr/share/modass/overrides/ngcp-mediaproxy-ng-kernel-source
/usr/share/modass/packages/default.sh /usr/share/modass/overrides/ngcp-rtpengine-kernel-source

26
debian/rules vendored

@ -13,15 +13,15 @@ b=$(CURDIR)/debian
## kernel package specific stuff
# Name of the source package
psource:=ngcp-mediaproxy-ng-kernel-source
psource:=ngcp-rtpengine-kernel-source
# Name of the dkms package
pdkms:=ngcp-mediaproxy-ng-kernel-dkms
pdkms:=ngcp-rtpengine-kernel-dkms
# short upstream name, used for module source directory
sname:=ngcp-mediaproxy-ng
sname:=ngcp-rtpengine
# Source version
sversion:=$(shell dpkg-parsechangelog|grep "^Version:"|cut -d" " -f2|rev|cut -d- -f2-|rev|cut -d':' -f2)
PACKAGE=ngcp-mediaproxy-ng-kernel
PACKAGE=ngcp-rtpengine-kernel
MA_DIR ?= /usr/share/modass
-include $(MA_DIR)/include/generic.make
-include $(MA_DIR)/include/common-rules.make
@ -46,7 +46,7 @@ clean:
cd daemon && $(MAKE) clean && cd ..
rm -f build-stamp
rm -f iptables-extension/libxt_MEDIAPROXY.so
rm -f daemon/mediaproxy-ng daemon/build_time.h daemon/.depend kernel-module/.xt_MEDIAPROXY.o.d
rm -f daemon/rtpengine daemon/build_time.h daemon/.depend kernel-module/.xt_MEDIAPROXY.o.d
rm -rf kernel-module/.tmp_versions
rm -f debian/README.html.gz debian/README.md.gz
dh_clean
@ -90,7 +90,7 @@ install: build
dh_installchangelogs -p$@ -P$(b)/$@
dh_installinit -p$@ -P$(b)/$@
dh_install -p$@ -P$(b)/$@
dh_strip --dbg-package=ngcp-mediaproxy-ng-dbg
dh_strip --dbg-package=ngcp-rtpengine-dbg
dh_compress -p$@ -P$(b)/$@
dh_fixperms -p$@ -P$(b)/$@
dh_makeshlibs -p$@ -P$(b)/$@ -V
@ -103,16 +103,16 @@ install: build
# Build architecture dependant packages
binary-arch: install \
ngcp-mediaproxy-ng-daemon \
ngcp-mediaproxy-ng-dbg \
ngcp-mediaproxy-ng-iptables
ngcp-rtpengine-daemon \
ngcp-rtpengine-dbg \
ngcp-rtpengine-iptables
# Build architecture independant packages
binary-indep: build install \
ngcp-mediaproxy-ng \
ngcp-mediaproxy-ng-dev \
ngcp-mediaproxy-ng-kernel-dkms \
ngcp-mediaproxy-ng-kernel-source
ngcp-rtpengine \
ngcp-rtpengine-dev \
ngcp-rtpengine-kernel-dkms \
ngcp-rtpengine-kernel-source
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install kdist kdist_configure kdist_image kdist_clean

@ -12,17 +12,17 @@ else
endif
# Name of the source package
psource:=ngcp-mediaproxy-ng-kernel-source
psource:=ngcp-rtpengine-kernel-source
# The short upstream name, used for the module source directory
sname:=ngcp-mediaproxy-ng
sname:=ngcp-rtpengine
### KERNEL SETUP
### Setup the stuff needed for making kernel module packages
### taken from /usr/share/kernel-package/sample.module.rules
# prefix of the target package name
PACKAGE=ngcp-mediaproxy-ng-kernel-modules
PACKAGE=ngcp-rtpengine-kernel-modules
# modifieable for experiments or debugging m-a
MA_DIR ?= /usr/share/modass
# load generic variable handling

@ -1,6 +1,6 @@
#!/bin/bash
# # ulimit -n 100000
# # G_SLICE=always-malloc valgrind --leak-check=full --track-origins=yes --show-possibly-lost=yes ./mediaproxy-ng -t 0 -i $IP -l 25060 -f
# # G_SLICE=always-malloc valgrind --leak-check=full --track-origins=yes --show-possibly-lost=yes ./rtpengine -t 0 -i $IP -l 25060 -f
pipe_o() {
nc localhost 25060

@ -38,15 +38,15 @@ if ! grep -q CONFIG_NETFILTER_XT_TARGET_MEDIAPROXY "$KERN"/net/netfilter/Makefil
) >> "$KERN"/net/netfilter/Makefile
fi
if ! grep -q Kconfig\\.mediaproxy-ng "$KERN"/net/netfilter/Kconfig; then
cat >> "$KERN"/net/netfilter/Kconfig.mediaproxy-ng << \__EOF
if ! grep -q Kconfig\\.rtpengine "$KERN"/net/netfilter/Kconfig; then
cat >> "$KERN"/net/netfilter/Kconfig.rtpengine << \__EOF
config NETFILTER_XT_TARGET_MEDIAPROXY
tristate "Sipwise NGCP MEDIAPROXY target support"
depends on IP_NF_FILTER
help
Sipwise NGCP mediaproxy-ng kernel support
Sipwise NGCP rtpengine kernel support
To compile it as a module, choose M here. If unsure, say N.
__EOF
echo 'source "net/netfilter/Kconfig.mediaproxy-ng"' >> "$KERN"/net/netfilter/Kconfig
echo 'source "net/netfilter/Kconfig.rtpengine"' >> "$KERN"/net/netfilter/Kconfig
fi

Loading…
Cancel
Save