diff --git a/.gitignore b/.gitignore index 546d5dfb..0a1783c5 100644 --- a/.gitignore +++ b/.gitignore @@ -39,10 +39,7 @@ ltmain.sh # apps and app data -src/sgsn/osmo-sgsn -src/gbproxy/osmo-gbproxy -src/gtphub/osmo-gtphub -src/libcommon/gsup_test_client +src/osmo-gbproxy #tests tests/testsuite.dir @@ -70,4 +67,11 @@ doc/manuals/osmomsc-usermanual.xml doc/manuals/common doc/manuals/build -contrib/osmo-sgsn.spec +contrib/osmo-gbproxy.spec + +# dpkg-buildpackage +/debian/.debhelper/ +/debian/autoreconf.after +/debian/autoreconf.before +/debian/osmo-gbproxy +/debian/tmp/ diff --git a/Makefile.am b/Makefile.am index 17b3fc63..47988ca2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,7 @@ SUBDIRS = \ BUILT_SOURCES = $(top_srcdir)/.version EXTRA_DIST = \ .version \ - contrib/osmo-sgsn.spec.in \ + contrib/osmo-gbproxy.spec.in \ debian \ git-version-gen \ osmoappdesc.py \ diff --git a/configure.ac b/configure.ac index f1a4ed48..0a0897ac 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script -AC_INIT([osmo-sgsn], +AC_INIT([osmo-gbproxy], m4_esyscmd([./git-version-gen .tarball-version]), [osmocom-net-gprs@lists.osmocom.org]) @@ -51,29 +51,10 @@ AC_SUBST(LIBRARY_DLSYM) PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.4.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.4.0) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.4.0) PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.4.0) -PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.4.0) PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 1.4.0) -PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.6.0) -PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.4.0) -PKG_CHECK_MODULES(LIBOSMOGSUPCLIENT, libosmo-gsup-client >= 1.0.0) - -# Enable/disable 3G aka IuPS + IuCS support? -AC_ARG_ENABLE([iu], [AS_HELP_STRING([--enable-iu], [Build 3G support, aka IuPS and IuCS interfaces])], - [osmo_ac_iu="$enableval"],[osmo_ac_iu="no"]) -if test "x$osmo_ac_iu" = "xyes" ; then - PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 1.0.0) - PKG_CHECK_MODULES(LIBASN1C, libasn1c >= 0.9.30) - PKG_CHECK_MODULES(LIBOSMORANAP, libosmo-ranap >= 0.6.0) - AC_DEFINE(BUILD_IU, 1, [Define if we want to build IuPS and IuCS interfaces support]) -fi -AM_CONDITIONAL(BUILD_IU, test "x$osmo_ac_iu" = "xyes") -AC_SUBST(osmo_ac_iu) - - -PKG_CHECK_MODULES(LIBGTP, libgtp >= 1.5.0) -PKG_CHECK_MODULES(LIBCARES, libcares) dnl checks for header files AC_HEADER_STDC @@ -257,23 +238,11 @@ AC_OUTPUT( include/osmocom/Makefile include/osmocom/sgsn/Makefile src/Makefile - src/gprs/Makefile - src/sgsn/Makefile - src/gbproxy/Makefile - src/gtphub/Makefile tests/Makefile - tests/atlocal - tests/gprs/Makefile - tests/sgsn/Makefile - tests/gtphub/Makefile - tests/xid/Makefile - tests/sndcp_xid/Makefile - tests/slhc/Makefile - tests/v42bis/Makefile doc/Makefile doc/examples/Makefile doc/manuals/Makefile contrib/Makefile contrib/systemd/Makefile - contrib/osmo-sgsn.spec + contrib/osmo-gbproxy.spec Makefile) diff --git a/contrib/osmo-gbproxy.spec.in b/contrib/osmo-gbproxy.spec.in new file mode 100644 index 00000000..4bb071c1 --- /dev/null +++ b/contrib/osmo-gbproxy.spec.in @@ -0,0 +1,82 @@ +# +# spec file for package osmo-sgsn +# +# Copyright (c) 2017, Martin Hauke +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +## Disable LTO for now since it breaks compilation of the tests +## https://osmocom.org/issues/4116 +%define _lto_cflags %{nil} + +Name: osmo-gbproxy +Version: @VERSION@ +Release: 0 +Summary: Osmocom GPRS Gb Interface Proxy +License: AGPL-3.0-or-later AND GPL-2.0-or-later +Group: Productivity/Telephony/Servers +URL: https://osmocom.org/projects/osmo-gbproxy +Source: %{name}-%{version}.tar.xz +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkgconfig +%if 0%{?suse_version} +BuildRequires: systemd-rpm-macros +%endif +BuildRequires: pkgconfig(libcrypto) >= 0.9.5 +BuildRequires: pkgconfig(libosmocore) >= 1.2.0 +BuildRequires: pkgconfig(libosmoctrl) >= 1.2.0 +BuildRequires: pkgconfig(libosmogb) >= 1.2.0 +BuildRequires: pkgconfig(libosmogsm) >= 1.2.0 +BuildRequires: pkgconfig(libosmovty) >= 1.2.0 +%{?systemd_requires} + +%description +The purpose of the Gb proxy is to aggregate the Gb links of multiple +BSS's and present them in one Gb link to the SGSN. + +%prep +%setup -q + +%build +echo "%{version}" >.tarball-version +autoreconf -fi +%configure \ + --docdir=%{_docdir}/%{name} \ + --with-systemdsystemunitdir=%{_unitdir} +make %{?_smp_mflags} + +%install +%make_install + +%if 0%{?suse_version} +%preun %service_del_preun %{name}.service +%postun %service_del_postun %{name}.service +%pre %service_add_pre %{name}.service +%post %service_add_post %{name}.service +%endif + +%check +make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) + +%files +%doc AUTHORS README +%dir %{_docdir}/%{name}/examples +%dir %{_docdir}/%{name}/examples/osmo-sgsn +%{_docdir}/%{name}/examples/osmo-sgsn/osmo-gbproxy.cfg +%{_docdir}/%{name}/examples/osmo-sgsn/osmo-gbproxy-legacy.cfg +%{_docdir}/%{name}/examples/osmo-sgsn/osmo-gbproxy-pool.cfg +%{_bindir}/osmo-gbproxy +%dir %{_sysconfdir}/osmocom +%config(noreplace) %{_sysconfdir}/osmocom/osmo-gbproxy.cfg +%{_unitdir}/%{name}.service + +%changelog diff --git a/contrib/osmo-sgsn.spec.in b/contrib/osmo-sgsn.spec.in deleted file mode 100644 index ca66e2ea..00000000 --- a/contrib/osmo-sgsn.spec.in +++ /dev/null @@ -1,140 +0,0 @@ -# -# spec file for package osmo-sgsn -# -# Copyright (c) 2017, Martin Hauke -# -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -## Disable LTO for now since it breaks compilation of the tests -## https://osmocom.org/issues/4116 -%define _lto_cflags %{nil} - -%define with_iu 1 -Name: osmo-sgsn -Version: @VERSION@ -Release: 0 -Summary: Osmocom's SGSN for 2G and 3G packet-switched mobile networks -License: AGPL-3.0-or-later AND GPL-2.0-or-later -Group: Productivity/Telephony/Servers -URL: https://osmocom.org/projects/osmosgsn -Source: %{name}-%{version}.tar.xz -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool -BuildRequires: pkgconfig -%if 0%{?suse_version} -BuildRequires: systemd-rpm-macros -%endif -BuildRequires: pkgconfig(libcares) -BuildRequires: pkgconfig(libcrypto) >= 0.9.5 -BuildRequires: pkgconfig(libgtp) >= 1.4.0 -BuildRequires: pkgconfig(libosmo-gsup-client) >= 1.0.0 -BuildRequires: pkgconfig(libosmo-netif) >= 0.4.0 -BuildRequires: pkgconfig(libosmoabis) >= 0.6.0 -BuildRequires: pkgconfig(libosmocore) >= 1.2.0 -BuildRequires: pkgconfig(libosmoctrl) >= 1.2.0 -BuildRequires: pkgconfig(libosmogb) >= 1.2.0 -BuildRequires: pkgconfig(libosmogsm) >= 1.2.0 -BuildRequires: pkgconfig(libosmovty) >= 1.2.0 -%{?systemd_requires} -%if %{with_iu} -BuildRequires: pkgconfig(libasn1c) -BuildRequires: pkgconfig(libosmo-ranap) >= 0.4.0 -BuildRequires: pkgconfig(libosmo-sigtran) >= 1.0.0 -%endif - -%description -OsmoSGSN is Osmocom's Serving GPRS Support Node for 2G and 3G -packet-switched mobile networks. - -%package -n osmo-gtphub -Summary: Osmocom GTP Hub: Proxy for GTP traffic between multiple SGSNs and GGSNs -Group: Productivity/Telephony/Servers - -%description -n osmo-gtphub -Osmocom GTP Hub: Proxy for GTP traffic between multiple SGSNs and GGSNs. - -%package -n osmo-gbproxy -Summary: Osmocom GPRS Gb Interface Proxy -Group: Productivity/Telephony/Servers - -%description -n osmo-gbproxy -The purpose of the Gb proxy is to aggregate the Gb links of multiple -BSS's and present them in one Gb link to the SGSN. - -%prep -%setup -q - -%build -echo "%{version}" >.tarball-version -autoreconf -fi -%configure \ -%if %{with_iu} - --enable-iu \ -%endif - --docdir=%{_docdir}/%{name} \ - --with-systemdsystemunitdir=%{_unitdir} -make %{?_smp_mflags} - -%install -%make_install - -%if 0%{?suse_version} -%preun %service_del_preun %{name}.service -%postun %service_del_postun %{name}.service -%pre %service_add_pre %{name}.service -%post %service_add_post %{name}.service -%preun -n osmo-gtphub %service_del_preun osmo-gtphub.service -%postun -n osmo-gtphub %service_del_postun osmo-gtphub.service -%pre -n osmo-gtphub %service_add_pre osmo-gtphub.service -%post -n osmo-gtphub %service_add_post osmo-gtphub.service -%preun -n osmo-gbproxy %service_del_preun osmo-gbproxy.service -%postun -n osmo-gbproxy %service_del_postun osmo-gbproxy.service -%pre -n osmo-gbproxy %service_add_pre osmo-gbproxy.service -%post -n osmo-gbproxy %service_add_post osmo-gbproxy.service -%endif - -%check -make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) - -%files -%doc AUTHORS README -%dir %{_docdir}/%{name}/examples -%dir %{_docdir}/%{name}/examples/osmo-sgsn -%exclude %{_docdir}/%{name}/examples/osmo-gtphub -%exclude %{_docdir}/%{name}/examples/osmo-gbproxy -%{_docdir}/%{name}/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg -%{_docdir}/%{name}/examples/osmo-sgsn/osmo-sgsn.cfg -%{_docdir}/%{name}/examples/osmo-sgsn/osmo-sgsn_custom-sccp.cfg -%{_bindir}/osmo-sgsn -%dir %{_sysconfdir}/osmocom -%config(noreplace) %{_sysconfdir}/osmocom/osmo-sgsn.cfg -%{_unitdir}/%{name}.service - -%files -n osmo-gtphub -%dir %{_docdir}/%{name}/examples -%dir %{_docdir}/%{name}/examples/osmo-gtphub -%{_docdir}/%{name}/examples/osmo-gtphub/osmo-gtphub-1iface.cfg -%{_docdir}/%{name}/examples/osmo-gtphub/osmo-gtphub.cfg -%{_bindir}/osmo-gtphub -%dir %{_sysconfdir}/osmocom -%config(noreplace) %{_sysconfdir}/osmocom/osmo-gtphub.cfg -%{_unitdir}/osmo-gtphub.service - -%files -n osmo-gbproxy -%dir %{_docdir}/%{name}/examples -%dir %{_docdir}/%{name}/examples/osmo-gbproxy -%{_docdir}/%{name}/examples/osmo-gbproxy/osmo-gbproxy.cfg -%{_bindir}/osmo-gbproxy -%dir %{_sysconfdir}/osmocom -%config(noreplace) %{_sysconfdir}/osmocom/osmo-gbproxy.cfg -%{_unitdir}/osmo-gbproxy.service - -%changelog diff --git a/contrib/systemd/Makefile.am b/contrib/systemd/Makefile.am index 11e8f981..81686c19 100644 --- a/contrib/systemd/Makefile.am +++ b/contrib/systemd/Makefile.am @@ -1,13 +1,11 @@ EXTRA_DIST = \ osmo-gbproxy.service \ - osmo-gtphub.service \ - osmo-sgsn.service + $(NULL) if HAVE_SYSTEMD SYSTEMD_SERVICES = \ osmo-gbproxy.service \ - osmo-gtphub.service \ - osmo-sgsn.service + $(NULL) systemdsystemunit_DATA = $(SYSTEMD_SERVICES) endif diff --git a/contrib/systemd/osmo-gtphub.service b/contrib/systemd/osmo-gtphub.service deleted file mode 100644 index 48817858..00000000 --- a/contrib/systemd/osmo-gtphub.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Osmocom GTP Hub - -[Service] -Type=simple -ExecStart=/usr/bin/osmo-gtphub -c /etc/osmocom/osmo-gtphub.cfg -Restart=always -RestartSec=2 -RestartPreventExitStatus=1 - -[Install] -WantedBy=multi-user.target diff --git a/contrib/systemd/osmo-sgsn.service b/contrib/systemd/osmo-sgsn.service deleted file mode 100644 index 0991c70c..00000000 --- a/contrib/systemd/osmo-sgsn.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Osmocom SGSN (Serving GPRS Support Node) -Wants=osmo-hlr.service -After=osmo-hlr.service -After=osmo-hnbgw.service - -[Service] -Type=simple -Restart=always -ExecStart=/usr/bin/osmo-sgsn -c /etc/osmocom/osmo-sgsn.cfg -RestartSec=2 - -[Install] -WantedBy=multi-user.target diff --git a/debian/changelog b/debian/changelog index 2827f43b..4d4bd82c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,449 +1,213 @@ -osmo-sgsn (1.6.0) unstable; urgency=medium +osmo-gbproxy (1.6.0) unstable; urgency=medium - [ Pau Espin Pedrol ] - * gprs_gmm: Introduce macros to access msgb's associated IU UE ctx - * gprs_llc.h: Improve documentation of some structs - * gprs_gmm.c: Improve doc on nullable parameters - * gprs_gmm.c: Drop unneeded brackets - * Introduce define TLLI_UNASSIGNED - * gprs_sgsn.c: Warn upon llme free unexpected scenarios - * gprs_gmm: Clarify comment during TLLI assignment - * gprs_sgsn.c: Remove recently introduced assert - * gprs_gmm: Introduce assert to guard against unexpected condition - * gprs_gmm.c: Use correct function to set MM_IDLE state during cleanup - * gprs_sgsn.h: Flag MM_CTX_T_GERAN_Iu as not supported - * gprs_gmm.c: Flag mmctx_set_(p)mm_state() functions static - * sgsn: use sccp_simple_client API to setup ss7 id 0 instead of 1 - * gprs_gmm.c: Fix typo in log message - * gprs_gmm.c: Call mmctx_set_(p)mm_state only on related ran_type - * Introduce and use log macros when no mm ctx available - * gprs_gmm: Avoid spaces in fsm events and enum strings - * tests: Verify that timers can be set over VTY - * Replace own timer infra with libosmocore osmo_tdef - * tests: Introduce vty-transcript-test tests - * gprs_gmm.c: Use osmo_rai_name() in log line - * examples: Add osmo-sgsn_custom-sccp.cfg - * vty: Introduce cs7-instance-iu - * gprs_gmm.c: Print value_string of reject cause - * gprs_gmm.c: Add spec document to function documentation - * gtp: make echo_interval unsigned - * gtp: cb_delete_context(): Clarify why pdp->lib is set to NULL - * Introduce log helper LOGGGSN and log category DGTP - * sgsn: gtp: Drop related pdp contexts on echo timeout against GGSN - * Move lots of Iu/ranap specific code into its own file - * Move llc->MM/SM Gb specific glue code to its own file - * Split enum gprs_pmm_state into Iu and Gb counterparts - * Merge common allocation steps for Gb and Iu ctx - * gprs_gmm.c: Replace inet_ntoa with inet_ntop - * sgsn_cdr.c: Fix ip addr string buffer size - * sgsn_vty: Fix mmctx rate_ctr output indentation - * sgsn_vty: Print correct Iu mmctx id in 'show mm-context' - * Introduce FSM mm_state_gb_fsm - * Introduce FSM mm_state_iu_fsm - * vty: Print MM state and RAN type in show mm-context - * src/gprs/Makefile.am: Move build of shared .c files to an internal lib - * Move out gbproxy to its own subdir - * Move out gtphub to its own subdir - * Move out sgsn to its own subdir - * gmm: Move code handling GMM Attach Complete to its own function - * gmm: Move code handling GMM Routing Area Update Complete to its own function - * gmm: Move code handling GMM PTMSI Realloc Complete to its own function - * enum gprs_gmm_state: Fix spec reference - * Implement GMM State using osmocom FSM - * Split out GPRS SM layer into its own file - * sgsn: Reject PdpActReq if no GTP pdp ctx exists - * Introduce TODO-RELEASE file - * sgsn_libgtp.c: Drop use of deprecated libgtp APIs gtp_retrans*() - * gmm: Fix assertion hit during RA UPD REQ before completting gmm attach - * Improve logging in gprs_llc.c code - * gprs_llc.c: Use enum instead of hardcoded value - * gprs_gmm.c: Send XID reset with received TLLI + [ Neels Hofmeyr ] + * manual: explain IuPS, add SCCP/M3UA section from common chapters - [ Alexander Couzens ] - * gprs/gprs_gmm: implement T3314. Timeout to reset MM state READY->STANDBY - * gprs_gmm: only update gb/iu cell information when Iu/Gb present - * gprs_gmm: clarify comment of Iu follow-on request - * gprs_gmm: gsm48_rx_gmm_att_req(): refactor duplicated code - * sgsn_pdp_ctx_terminate: check llme before accessing - * gprs_ranap: send CommonId after receiving Security Mode Complete - * mm_gb_fsm: unassign the llme when entering MM_IDLE - * gprs_ranap: refactor REQUIRE_MM define - * sgsn: when receiving data PDU notify the Gb GMM fsm - * Avoid compiling unneeded files when building without Iu - * gprs_ranap: release Iu UE Context when exiting PMM Connected - * Iu: implement a user inactivity timer - * gprs_ranap: on Iu release, stop the attach fsm if running - * gprs_mm_state_gb_fsm: ensure T3350 is not running when entering IDLE - * gprs_ranap: add missing rc = 0 - * gprs_sgsn: always allocate Gb/Iu mm fsm - * sgsn: MM Gb Fsm: fix event handling for implicit detach - * ranap: add non-spec X1001 - * gprs_gmm: release Iu connection on RAU failures - * sgsn_mm_ctx_alloc(): check for unallocated fsms - * sgsn_libgtp: refactor ps paging into gprs_gb - * sgsn: Gb: implementing PS Paging when MS is MM_STANDBY - - [ Vadim Yanitskiy ] - * gprs_mm_state_iu_fsm.c: fix: assign timer_cb to mm_state_iu_fsm - - [ Max ] - * Use libosmocore constant for IMSI length in ACL entry + [ Eric ] + * tests: dlopen does not imply availability of dlsym.. + * configure.ac: fix libtool issue with clang and sanitizer [ Harald Welte ] - * LLC: Don't use hard-coded N201-U / N201-I values in XID - * Initial OsmoGbPROXY user manual - * check for osmo_fsm_register() error return values - * check for osmo_ss7_init() error return value - * manual: Fix copy+paste error - * exit(2) on unsupported positional arguments on command line + * gtphub_test: Fix compilation with gcc-10 [ Oliver Smith ] - * gitignore: fix paths to binaries - * doc: add OsmoGbProxy VTY reference - * regen_doc.sh: support gbproxy, run without docker - * osmoappdesc.py, tests: switch to python 3 + * contrib: import RPM spec + * contrib: integrate RPM spec + * Makefile.am: EXTRA_DIST: debian, contrib/*.spec.in - -- Pau Espin Pedrol Fri, 03 Jan 2020 19:17:56 +0100 - -osmo-sgsn (1.5.0) unstable; urgency=medium - - [ Max ] - * Improve 'show subscriber cache' vty command - * GMM: permit VLR_ANSWERED event in attach FSM - * Fix IMSI padding in imsi-acl + [ Neels Hofmeyr ] + * gbproxy_test.c: fix mobile identity test data + * use new osmo_mobile_identity API everywhere [ Harald Welte ] - * gbproxy_test: Fix test expectations of gprs_ns_rcvmsg() - * LLC XID: Fix string representation of N201_U - * LLC: Don't blindly assume all LLC frames have data payload - * LLC: Avoid NOTICE message on LLC NULL - * gprs_llc: Correctly refuse any ABM command (SABM, DISC) with DM - * LLC: Store the XID inside the LLC Entity, not LLC Mgmg Entity - * gb_proxy.h: Add missing comments; improve comments - * gb_proxy: cosmetic: Use 'bool' in data structures where applicable - - [ efistokl ] - * gsm0408_rcv_gmm: send Iu-ReleaseCommand upon receiving Attach Complete. - * gprs_gmm: send Service Reject when no PDP ctxs are available. + * *.spec.in: Use %config(noreplace) to retain current config file [ Alexander Couzens ] - * gprs_gmm: reintroduce calling gsm48_gmm_authorize when not handling GMM Attach Requests - * gbproxy: parse dtap GSM48_MT_GSM_DEACT_PDP_REQ|ACK + * gtphub: rename sgsn's oww osmo_sockaddr into sgsn_sockaddr + + [ Vadim Yanitskiy ] + * debian/control: change maintainer to the Osmocom team / mailing list [ Pau Espin Pedrol ] - * gprs_sndcp_comp_free: Replace ifelse with switch and better handling of error - * sgsn: vty: Improve log warning content with spec section - * Document max retransmit times for T3395 - * sgsn: Fix echo timer not started upon first pdp ctx created - * sgsn_libgtp: Use new per-GSN libgtp API instead of deprecated API - * sgsn: Have authentication required on by default - * Remove undefined param passed to {logging,osmo_stats}_vty_add_cmds - * Require newer versions of dependencies + * configure.ac: Fix trailing whitespace + * doc: Update VTY reference xml file + * Support setting rt-prio and cpu-affinity mask through VTY + + [ Daniel Willmann ] + * gbproxy-usermanual: Explain BSSGP/BVC handling + + [ Alexander Couzens ] + * gtphub_test: fix compilation error on gcc 10.2.0 + + [ Pau Espin Pedrol ] + * contrib/jenkins: Enable parallel make in make distcheck [ Keith ] - * Echo zero byte XID-Field of Type L3_PAR + * VTY: Add gtp state-dir command - [ Oliver Smith ] - * debian: create -doc subpackage with pdf manuals - * contrib/jenkins.sh: run "make maintainer-clean" - * osmo-gtphub.cfg: fix conflict with osmo-sgsn.cfg - * osmo-gbproxy.cfg: fix conflict with osmo-sgsn.cfg + [ Alexander Couzens ] + * Port gbproxy to NS2 + + [ Daniel Willmann ] + * gbproxy: Whitespace fixes + * gbproxy: Add todo for BVC RESET logic + * gbproxy: Get the peer if paging by BVCI on SIG_BVC + * Let libosmocore handle VTY parent node tracking + * osmo-gbproxy: Free msgb in ns2 prim callback + * configure.ac: Require python3 for ext_tests + * osmo-gbproxy: Implement nsvc-state ctrl command + + [ Harald Welte ] + * gbproxy: Properly implement paging to LAC/RAC + * gbproxy: Implement paging to entire BSS area + + [ Pau Espin Pedrol ] + * gbproxy: generate coredump and exit upon SIGABRT received + + [ Harald Welte ] + * gbproxy: Pass TLLI as LSP towards NS to facilitate load sharing + * gb_proxy_peer: Add some FIXMEs regarding invalid assumptions + + [ Daniel Willmann ] + * gbproxy: Remove test testing NSVCI change + * gbproxy: Add NSE peer that can have multiple gbproxy_peers + * gbproxy: Ensure BVC0 is reset before handling PtP BVCs + * gbproxy: Only send paging to each matching NSE once + * gbproxy: Separate function to move gbproxy_peer to different nse + + [ Harald Welte ] + * gb_proxy: More precise + readable log messages + + [ Daniel Willmann ] + * gbproxy: Add logging macros for NSE and BVC + * gbproxy: Use LOG macros for NSE/BVC + * gbproxy: Change generic LOG messages so BVCI/NSEI fmt is consistent + * gbproxy: Add todos encountered while going through the code + + [ Harald Welte ] + * gb_proxy: Broadcast SGSN-INVOKE-TRACE and OVERLOAD + * gbproxy: Move BSS-side BVC-RESET processing to its own function + * gb_proxy: Slightly restructure processing of BSS-originated BVC-RESET + * gbproxy: Cosmetics: use longer lines + + [ Daniel Willmann ] + * gbproxy: Add BVC log filters + * gbproxy: Add newline to log message + * gbproxy: Allow gbproxy_nse_free(NULL) + * gbproxy: Delete gbproxy_nse in delete-gbproxy-peer VTY command + + [ Harald Welte ] + * gbproxy: Send BVC-STATUS if BSS sends us BVC-RESET without mandatory IEs + * gb_proxy: Use TLVP_PRES_LEN instead of TLVP_PRESENT + * gb_proxy: Rename gbproxy_peer to gbproxy_bvc + * gbproxy: Rename gbproxy_cfg.nses to gbproxy_cfg.bss_nses + * gbproxy: convert bss_nses from llist_head to hashtable + * gbproxy: convert nse->bvcs from llist_head to hashtable + * gbproxy: Remove patching, TLLI-tracking and SGSN2 support + * gb_proxy: cosmetic: Use function rather than open-coding is_sgsn + * gbproxy: Delete gbproxy_test + * gb_proxy: Introduce more validation / constraint checks + * gbproxy: use gbprox_relay2peer() whenever possible + * gb_proxy: Use osmo_tlv_prot_parse() to validate mandatory IEs + * gbproxy: Log FSM timeouts + * migrate to DLBSSGP as log sub-system for BSSGP + * gbproxy major rewrite for SGSN pool support + * gbproxy: Use "(nsei << 16) | bvci" as rate_ctr_group index + * gbproxy: Introduce new DOBJ log category; log object allocation/release + * gbproxy: Don't create an extra msgb copy for SGSN DL SIG + * gbproxy: Implement handling of BVC Flow Control + + [ Daniel Willmann ] + * gbproxy: Fix bvci check in gbprox_rx_ptp_from_* + + [ Harald Welte ] + * gbproxy: Copy RA-ID from BSS side BVC to CELL and SGSN-side BVC + * gbproxy: (Re)allocate SGSN-side PTP BVC even if CELL already exists + * gbproxy: Fix segfault when receiving PAGING for unknown destination + * gbproxy: Add FSM related VTY commands + * gbproxy: Implement scaling of BVC flow control in SGSN pool + * gbproxy: Improve VTY state introspection + * gbproxy: rename vty command "show gbproxy ..." to "show gbproxy bvc ..." + + [ Daniel Willmann ] + * osmo-gbproxy: Initialize all hash_maps + * gbproxy: Fix confusing log message in gbprox_relay2nse + + [ Harald Welte ] + * gbproxy: Add "show gbproxy cell ..." VTY command + + [ Daniel Willmann ] + * gbproxy: Add SGSN NRI configuration + * gbproxy: Add SGSN pooling support + * gbproxy: Add comments to sgsn functions + + [ Harald Welte ] + * gbproxy: Fix build on Deiban 8 + + [ Alexander Couzens ] + * sgsn: Use the new NS2 api + * gbproxy: use ns2 vty2 + + [ Daniel Willmann ] + * gbproxy: Add config option to name an SGSN + * gbproxy: Add VTY command to override the node selection function [ Vadim Yanitskiy ] - * doc/manuals/vty: regenerate sgsn_vty_reference.xml - * osmo-sgsn: add VTY parameter to toggle authentication - * sgsn_mm_ctx_find_ggsn_ctx(): fix: always set gsm_cause - - [ Eric Wild ] - * replace magic tmsi constant with define - * turn -Werror=null-dereference into a warning + * gb_proxy_peer: sgsn can never be NULL in gbproxy_sgsn_by_nri() + * gb_proxy_peer: fix NULL pointer dereference in gbproxy_sgsn_alloc() [ Daniel Willmann ] - * manuals: Add script to regenerate vty/counter documentation - * manuals: Update vty/counter documentation - * Add/fix help string for version option - * osmo-sgsn: Fix outdated information in usermanual - * configuration.adoc: Small fixes - * configuration.adoc: Add a section about encryption - - [ Ruben Undheim ] - * Spelling fixes - - -- Pau Espin Pedrol Thu, 08 Aug 2019 16:46:31 +0200 - -osmo-sgsn (1.4.0) unstable; urgency=medium + * Fix gbproxy_sgsn_by_tlli wraparound [ Alexander Couzens ] - * gprs_subscriber: gsup_auth_error: reject MS in all cases - * gprs_gmm: make functions relating to GMM Attach Request public - * gprs_gmm: make extract_subscr_msisdn extract_subscr_hlr public - * gprs_gmm: Cancel Location: use detach type IMSI - * vty: add cmd "reset sgsn state" - * tests: remove gmm unit tests - * gprs_gmm: introduce a GMM Attach Request FSM - * debian: add missing build dependencies - * sgsn: use gtp_clear_queues() when reset sgsn state - * vty: restart sgsn state: improve output message - * sgsn_ggsn_ctx_drop_pdp: protect against nullpointer when MM is gone - * gprs_sgsn.h: fix wrong type of re-attempts - * GTP: refactor the echo timer - * gprs_gmm: dont answer unknown IMSI/TMSI on Service Requests NET_FAIL - * gprs_gmm: Fix missing Security Command for 3G when attaching - * sgsn_libgtp: fix a potential memleak when the GGSN is not reachable - * gprs_llc: remove the FCS from the msgb by trim'ing the msgb - * OsmoSGSN: add rate counter documentation + * configure.ac: define a c standard instead of using the compilers default [ Daniel Willmann ] - * gb_proxy: tallocate memory for gbproxy cfg so it can be a talloc ctx - * gb_proxy: Add ctrl interface and nsvc-state, gbproxy-state commands - * git-version-gen: Don't check for .git directory - - [ Stefan Sperling ] - * add a test for OS#3178 (invalid unitdata message) - * finish gbproxy_parse_bssgp_unitdata test - * fix bogus assertion in encode_comp_field() - * fix bogus error check in gprs_sndcp_comp_create() - * use enums consistently instead of falling back to int - * update gbproxy test expected output - * consistently check the result of osmo_shift_v_fixed() - * remove pointless declaration of struct gsm_network - * make gsup ipa name configurable in osmo-sgsn.cfg - - [ Pau Espin Pedrol ] - * jenkins.sh: Use --enable-werror only when iu support is disabled - * jenkins.sh: Remove non-existent configure options - * Drop all references of unused SMPP - * Drop all references of unused MGCP - * Drop unused common_vty.c - * sgsn_libgtp.c: Log pointer of deleted context - * Maintain per ggsn pdp ctx list - * osmo-sgsn: ping GGSN periodically and check for restart counter - * Disarm T3395 when dettaching mmctx from pdpctx - * examples: Enable by default echo req towards active GGSNs - * vty: Add cmd to disable echo loop explictly - * Add optional TearDownInd IE in PDP DEACT REQ towards PCU - * sgsn: Don't attempt to delete GTP pdp ctx if GGSN was restarted - * Forward GGSN originated DEACT PDP CTX REQ - * sgsn: Fix T3395 firing forever - * sgsn: subscriber: Avoid calling memcpy with NULL src - * sgsn: cdr: Fix uninitialized string access if ggsn is detached - * sgsn: gtp: Use new API to send PDP DEL CTX REQ without freeing ctx locally - * sgsn: Fix crash using new libgtp cb_recovery2 API - * gbproxy: Replace '.' in counter names with ':' - * Drop gprs_msgb_copy with libosmocore replacement - * Drop gprs_msgb_resize_area with libosmocore replacement - * Use osmo_clock_gettime from libosmocore - * gbproxy: Add VTY parameter: link stored-msgs-max-length - * gbproxy: Add new VTY-managed timer: link-list clean-stale-timer - * gbproxy: Replace '.' in counter names with ':' - * Add osmo-gtphub systemd service file - * debian: Fix typo in rules preventing build with IU support - * Install systemd services with autotools - * Install sample cfg file to /etc/osmocom - * Update wrong references to bsc in sgsn code - * Allocate sgsn_instance with talloc - * gbproxy: flag gbproxy_assign_imsi as static - * gbproxy: Fix abort during APN patch - * gbproxy: Remove unneeded parse_ctx param - * gbproxy: flush_stored_messages: Move comment to func description - * gbproxy: flush_stored_messages: Log and route using stored_msg info - * gbproxy: flush_stored_messages: Get rid of msg param - * Allow easily disabling GFDL references - * OsmoSGSN: configuration: Move pdp ctx specific CDR fields to its own table - * OsmoSGSN: configuration: Add missing pdp-periodic event - * OsmoSGSN: configuration: Document CDR CTRL interface - * OsmoSGSN: overview: Fix typo and reference OpenGGSN->OsmoGGSN - - [ Harald Welte ] - * migrate to oap_client in libosmogsm - * remove libcommon - * gbproxy-legacy: Ensure well-formed config file - * Remove local libgsupclient; Use libosmo-gsup-client from osmo-hlr - * initial checkin of manuals to public repo - * Add link to Asciidoc source code of manual - * OsmoSGSN: Fix formatting/cross reference in CDR section - * Update GSUP chapter regarding UMTS AKA and other recent changes - * GSUP: Add ladder diagrams for protocol transactions / procedures - * share chapters/gsup.adoc from OsmoSGSN to OsmoMSC + OsmoHLR - * vty-ref: Update URI of docbook 5.0 schema - - [ Neels Hofmeyr ] - * use __FILE__, not __BASE_FILE__ - * vty: fix doc str for 'reset sgsn state' - * vty: add SCCP related vty commands - * fix build: remove unused variable - * Importing history from osmo-gsm-manuals.git - * add 'make check' target - * fix 'make clean': shell glob, ignore failure - * refactor Makefile build rules, don't use the FORCE - * OsmoSGSN: update VTY reference - * sgsn: update vty reference + * gbproxy: Implement TLLI cache and use it for SUSPEND/RESUME + * gbproxy: Increase TLLI cache timeout to 10s [ Oliver Smith ] - * gtphub: Add --version cmdline option - * build manuals moved here from osmo-gsm-manuals.git - * Fix DISTCHECK_CONFIGURE_FLAGS override - * contrib/jenkins.sh: build and publish manuals - * contrib: fix makedistcheck with disabled systemd + * contrib/jenkins: don't build osmo-gsm-manuals - [ Max ] - * Cleanup non-existent files from debian/copyright - * Use safer functions for IMSI ACL - * gbproxy: fix formatting in gbproxy-state command - * gbproxy: add number-of-peers ctrl command - * Revert "gbproxy: fix formatting in gbproxy-state command" - * Add OsmoSGSN control interface description - * Remove misleading comment - * Constify sgsn_acl_lookup() parameter - * Drop unused osmo-sgsn.pc - * Use explicit length check - * Use explicit parameter for sgsn_auth_init() - - [ Jonathan Brielmaier ] - * fix various typos across all manuals - - [ ikostov ] - * SGSN: add Auth. policy, NS Statistics and BSSGP state examples, tweaks - * GSUP, OAP: fix AUTS length to 14, not 16 - - [ Philipp Maier ] - * osmo-sgsn: Update VTY command reference - * osmo-sgsn: improve auth-policy explaination - * osmo-sgsn: Explain TCP/IP header compression - * osmo-sgsn: fix arrow tips in flow diagrams - - [ Holger Hans Peter Freyther ] - * sgsn: Fix numbering of QoS and add basic description for APN - * sgsn: Add charging characteristics to GSUP - - -- Harald Welte Wed, 23 Jan 2019 18:32:41 +0100 - -osmo-sgsn (1.3.0) unstable; urgency=medium - - [ Neels Hofmeyr ] - * drop osmo_sgsn.cfg from src/gprs dir - * change default config filename to osmo-sgsn.cfg, not osmo_sgsn.cfg - * vty: skip installing cmds now always installed by default - * add --enable-sanitize config option - * use default point-code as listed on Point_Codes wiki page - * gprs_gmm: segfault: gracefully handle failure to alloc context - * gsm48_rx_gmm_att_req: fix error handling: don't clean up NULL llme - * gprs_llc: tx dl ud: make mismatching LLE not crash osmo-sgsn - * fix build: missing LIBGTP_CFLAGS in sgsn_test - * sgsn_test: guard against struct gprs_ra_id changing - * vty: absorb command explanations from osmo-gsm-manuals - * configure: add --enable-werror - * implement support for 3-digit MNC with leading zeros - * osmo-gbproxy: use 'osmo-gbproxy.cfg' as default config name - * compiler warnings: use enum ranap_nsap_addr_enc, constify local var - * use osmo_init_logging2(), fix regression test memleaks - * auth+ciph: log is_r99 and auth types - * log two RA Update Request failure causes - * GERAN: allow GSM SRES on UMTS AKA challenge - - [ Alexander Couzens ] - * .gitignore: remove unneeded ignores of bsc/msc/nitb files - * tests/ctrl_test_runner.py: remove BSC/NAT TestRunner - * debian: remove doublicated project name in example files - * .gitignore: remove non-existent /src/utils exludes - * configure.ac: remove pcap check - * configure.ac: remove unused libcdk check - * .service: remove OpenBSC from service desription - * mandatory depend on libc-ares and libgtp - * GMM: dont reply to GMM_DETACH_REQ with POWER OFF when MS is unknown + [ Daniel Willmann ] + * gbproxy: Implement IMSI cache + * gbproxy: Use IMSI cache to handle PAGING_PS_REJECT + * gbproxy: Use C-style comments + * gbproxy: Move helper function to a more logical place + * gbproxy: Remove unused variable assignment + * gbproxy: Fix VTY cmd name + * gbproxy: Define and use help string for gbproxy + * gbproxy: Add VTY commands to query the TLLI/IMSI cache [ Harald Welte ] - * Replace '.' in counter names with ':' - * Add talloc context introspection via VTY + * gb_proxy: Don't use orphan log subsystem DPCU - [ Pau Espin Pedrol ] - * Replace '.' in counter names with ':' - * tests: Fix selection of python version - * sgsn_cdr: Split log formatting into a snprintf function - * Add vty cmd 'cdr trap' to send CDR through CTRL iface - * tests: sgsn_test: Define wrap APIs with correct parameters - * cosmetic: tests: sgsn_test: Use proper formatting and remove uneeded semicolons - * gprs_gmm: Remove unused variable - * cosmetic: gprs_gmm: Remove trailing whitespace - * gprs_gmm: Convert warning message to pragma message - * configure.ac: Enable Wall in CFLAGS - * .gitignore: Add m4 files - * sgsn_libgtp.c: Fix typos and whitespace - - [ Max ] - * Fix display of GTP addresses - * Show GTP version for PDP context in vty - * Remove unneeded .py scripts - * Replace '.' in counter names with ':' - * Remove dead code - * Enable sanitize for CI tests - * cosmetic: use macro for gtphub plane iteration - * Use connection id when allocating rate counters - * Migrate from OpenSSL to osmo_get_rand_id() - * Remove obsolete ./configure option - * Fix RAI construction - * gtphub: make rate_ctr unique - * Remove unused bsc_version.c - * Use gsm48_encode_ra() for RAI encoding - * gtphub: check for gsn_addr_from_sockaddr() errors - * gtphub: check for gsn_addr_from_sockaddr() error - - -- Pau Espin Pedrol Thu, 03 May 2018 19:01:44 +0200 - -osmo-sgsn (1.2.0) unstable; urgency=medium - - [ Neels Hofmeyr ] - * jenkins: fix build: remove unused dependencies - * debian: fix osmo-sgsn.install, tweak VCS link and descriptions - * drop files unrelated to osmo-sgsn - * rewrite README - * configure.ac: set name to osmo-sgsn, fix ML addr - * move openbsc.pc to osmo-sgsn.pc - * move include/openbsc to include/osmocom/sgsn - * jenkins.sh: fix echo string to say osmo-sgsn, not msc - * jenkins: use osmo-clean-workspace.sh before and after build + [ Daniel Willmann ] + * gbproxy: Use IMSI cache for PTP paging and implement DUMMY_PAGING_PS + * gbproxy: Print the correct message type for dummy paging/paging reject + * gbproxy: Improve log messages in gbproxy_select_sgsn + * gbproxy: Fix radio status routing by TMSI [ Alexander Couzens ] - * debian: fix paths of examples - * debian/rules: show testsuite.log when tests are failing - - [ Max ] - * Remove rest_octets.h - * gbproxy: ensure peer allocation result - * jenkins: use osmo-ggsn for tests - * Cleanup configure checks - * Use extended logging for PDP contexts - * deb: fix copyright file issues - * Move P-TMSI alloc/update into separate function - * Check for correct P-TMSI allocation - * Use new FSF address in license header - * SGSN: uncomment BSSGP vty tests - * SGSN: print additional GTP-related info - * SGSN: check that GSN is created in proper mode - * Fix APN printing - * Fix build after recent rate_ctr patches - * gbproxy: don't link unnecessary - * Fix libosmo-sigtran dependency - * jenkins: check for IU properly - * Log GTP-U endpoints update - * Log address on GTP creation - - [ Pau Espin Pedrol ] - * Remove unneeded dep libdbi - - [ Philipp Maier ] - * log: fix default loglevels - * non-iu-build: guard vty libosmo-sigtran function calls. - * configure: fix libosmo-sigtran dependency + * follow libosmocore/gprs_ns2 API changes of GPRS enums [ Harald Welte ] - * Debian: Add systemd service files for osmo-sgsn and osmo-gbproxy - * Debian: fix dh_strip rules for creating one -dbg per program + * gbproxy: Avoid depending on any of the SGSN code - -- Harald Welte Sat, 28 Oct 2017 19:07:48 +0200 + [ Daniel Willmann ] + * manual/gbproxy: Update overview chapter + * Rename OsmoGbPROXY -> *Proxy + * manuals/gbproxy: Update configuration chapter + * manuals/gbproxy: Add osmo-bsc MSC pooling chapter from Neels as a base + * manuals/gbproxy: MSC -> SGSN for pooling chapter + * manuals/gbproxy: Move pooling to separate chapter -osmo-sgsn (0.1.0) unstable; urgency=low + [ Alexander Couzens ] + * gbproxy: follow gprs_ns2 API vty changes + * sgsn: migrate to the new gprs_ns2_vty configuration + * follow libosmocore/gprs_ns2 API changes (gprs_ns2_dynamic_create_nse) - * Initial release. + [ Oliver Smith ] + * === Split osmo-gbproxy from osmo-sgsn === - -- Alexander Couzens Tue, 08 Aug 2017 01:13:05 +0000 + -- Oliver Smith Fri, 29 Jan 2021 12:57:28 +0100 diff --git a/debian/control b/debian/control index e512c8fb..dd704806 100644 --- a/debian/control +++ b/debian/control @@ -1,4 +1,4 @@ -Source: osmo-sgsn +Source: osmo-gbproxy Section: net Priority: extra Maintainer: Osmocom team @@ -12,46 +12,12 @@ Build-Depends: debhelper (>=9), pkg-config, libtalloc-dev, libc-ares-dev, - libgtp-dev (>= 1.5.0), libosmocore-dev (>= 1.4.0), - libosmo-abis-dev (>= 0.6.0), - libosmo-netif-dev (>= 0.4.0), - libosmo-gsup-client-dev (>= 1.0.0), - libasn1c-dev (>= 0.9.30), - libosmo-ranap-dev (>= 0.6.0), - libosmo-sigtran-dev (>= 1.0.0), - libosmo-sccp-dev (>= 1.0.0), osmo-gsm-manuals-dev Standards-Version: 3.9.8 -Vcs-Git: git://git.osmocom.org/osmo-sgsn.git -Vcs-Browser: https://git.osmocom.org/osmo-sgsn -Homepage: https://projects.osmocom.org/projects/osmo-sgsn - - -Package: osmo-sgsn -Architecture: any -Multi-Arch: foreign -Depends: ${misc:Depends}, ${shlibs:Depends} -Description: OsmoSGSN: Osmocom's Serving GPRS Support Node for 2G and 3G packet-switched mobile networks - -Package: osmo-sgsn-dbg -Section: debug -Architecture: any -Multi-Arch: same -Depends: osmo-sgsn (= ${binary:Version}), ${misc:Depends} -Description: OsmoSGSN: Osmocom's Serving GPRS Support Node for 2G and 3G packet-switched mobile networks - -Package: osmo-gtphub -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: Osmocom GTP Hub: Proxy for GTP traffic between multiple SGSNs and GGSNs - -Package: osmo-gtphub-dbg -Architecture: any -Section: debug -Priority: extra -Depends: osmo-gtphub (= ${binary:Version}), ${misc:Depends} -Description: Debug symbols for Osmocom GTP Hub +Vcs-Git: git://git.osmocom.org/osmo-gbproxy.git +Vcs-Browser: https://git.osmocom.org/osmo-gbproxy +Homepage: https://projects.osmocom.org/projects/osmo-gbproxy Package: osmo-gbproxy Architecture: any @@ -69,7 +35,7 @@ Priority: extra Depends: osmo-gbproxy (= ${binary:Version}), ${misc:Depends} Description: Debug symbols for Osmocom GPRS Gb Interface Proxy -Package: osmo-sgsn-doc +Package: osmo-gbproxy-doc Architecture: all Section: doc Priority: optional diff --git a/debian/copyright b/debian/copyright index 5bc764d6..4f4fdfb7 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,6 +1,6 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: osmo-sgsn -Source: git://git.osmocom.org/osmo-sgsn +Upstream-Name: osmo-gbproxy +Source: git://git.osmocom.org/osmo-gbproxy Files: .gitignore .gitreview diff --git a/debian/osmo-gbproxy-doc.install b/debian/osmo-gbproxy-doc.install new file mode 100644 index 00000000..d9340885 --- /dev/null +++ b/debian/osmo-gbproxy-doc.install @@ -0,0 +1,2 @@ +# FIXME: debian package doesn't generate manuals yet, see OS#4992 +# usr/share/doc/osmo-gbproxy-doc/*.pdf diff --git a/debian/osmo-gbproxy.install b/debian/osmo-gbproxy.install index 1cb91d5d..df11836e 100644 --- a/debian/osmo-gbproxy.install +++ b/debian/osmo-gbproxy.install @@ -1,4 +1,4 @@ etc/osmocom/osmo-gbproxy.cfg lib/systemd/system/osmo-gbproxy.service usr/bin/osmo-gbproxy -usr/share/doc/osmo-sgsn/examples/osmo-gbproxy/osmo-gbproxy.cfg usr/share/doc/osmo-gbproxy/examples +etc/osmocom/osmo-gbproxy.cfg diff --git a/debian/osmo-gtphub.default b/debian/osmo-gtphub.default deleted file mode 100644 index 6af82da3..00000000 --- a/debian/osmo-gtphub.default +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_FILE="/etc/osmocom/osmo-gtphub.cfg" - diff --git a/debian/osmo-gtphub.init b/debian/osmo-gtphub.init deleted file mode 100755 index 160d55b7..00000000 --- a/debian/osmo-gtphub.init +++ /dev/null @@ -1,150 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: osmo-gtphub -# Required-Start: $network $local_fs -# Required-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Osmocom GTP hub -# Description: Osmocom GTP hub -### END INIT INFO - -# Author: Neels Hofmeyr - -# PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/usr/sbin:/bin:/usr/bin -NAME=osmo-gtphub # Introduce the short server's name here -DESC="Osmocom GTP hub" # Introduce a short description here -DAEMON=/usr/bin/osmo-gtphub # Introduce the server's location here -SCRIPTNAME=/etc/init.d/osmo-gtphub - -# Exit if the package is not installed -[ -x $DAEMON ] || exit 0 - -# Read configuration variable file if it is present -[ -r /etc/default/osmo-gtphub ] && . /etc/default/osmo-gtphub - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. -. /lib/lsb/init-functions - -DAEMON_ARGS="$DAEMON_ARGS -D -c $CONFIG_FILE" - -# -# Function that starts the daemon/service -# -do_start() -{ - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \ - || return 1 - start-stop-daemon --start --quiet --exec $DAEMON -- \ - $DAEMON_ARGS \ - || return 2 - # Add code here, if necessary, that waits for the process to be ready - # to handle requests from services started subsequently which depend - # on this one. As a last resort, sleep for some time. -} - -# -# Function that stops the daemon/service -# -do_stop() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - # Wait for children to finish too if this is a daemon that forks - # and if the daemon is only ever run from this initscript. - # If the above conditions are not satisfied then add some other code - # that waits for the process to drop all resources that could be - # needed by services started subsequently. A last resort is to - # sleep for some time. - start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON - [ "$?" = 2 ] && return 2 - return "$RETVAL" -} - -# -# Function that sends a SIGHUP to the daemon/service -# -do_reload() { - # - # If the daemon can reload its configuration without - # restarting (for example, when it is sent a SIGHUP), - # then implement that here. - # - start-stop-daemon --stop --signal 1 --quiet $PIDFILE --name $NAME - return 0 -} - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - status) - status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? - ;; - #reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - #log_daemon_msg "Reloading $DESC" "$NAME" - #do_reload - #log_end_msg $? - #;; - restart|force-reload) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - log_daemon_msg "Restarting $DESC" "$NAME" - do_stop - case "$?" in - 0|1) - do_start - case "$?" in - 0) log_end_msg 0 ;; - 1) log_end_msg 1 ;; # Old process is still running - *) log_end_msg 1 ;; # Failed to start - esac - ;; - *) - # Failed to stop - log_end_msg 1 - ;; - esac - ;; - *) - #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 - exit 3 - ;; -esac - -: diff --git a/debian/osmo-gtphub.install b/debian/osmo-gtphub.install deleted file mode 100644 index 07820767..00000000 --- a/debian/osmo-gtphub.install +++ /dev/null @@ -1,5 +0,0 @@ -etc/osmocom/osmo-gtphub.cfg -lib/systemd/system/osmo-gtphub.service -usr/bin/osmo-gtphub -usr/share/doc/osmo-sgsn/examples/osmo-gtphub/osmo-gtphub-1iface.cfg usr/share/doc/osmo-gtphub/examples -usr/share/doc/osmo-sgsn/examples/osmo-gtphub/osmo-gtphub.cfg usr/share/doc/osmo-gtphub/examples diff --git a/debian/osmo-sgsn-doc.install b/debian/osmo-sgsn-doc.install deleted file mode 100644 index bdc6a992..00000000 --- a/debian/osmo-sgsn-doc.install +++ /dev/null @@ -1 +0,0 @@ -usr/share/doc/osmo-sgsn-doc/*.pdf diff --git a/debian/osmo-sgsn.install b/debian/osmo-sgsn.install deleted file mode 100644 index b9a46abf..00000000 --- a/debian/osmo-sgsn.install +++ /dev/null @@ -1,5 +0,0 @@ -/etc/osmocom/osmo-sgsn.cfg -lib/systemd/system/osmo-sgsn.service -usr/bin/osmo-sgsn -usr/share/doc/osmo-sgsn/examples/osmo-sgsn/osmo-sgsn.cfg usr/share/doc/osmo-sgsn/examples -usr/share/doc/osmo-sgsn/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg usr/share/doc/osmo-sgsn/examples diff --git a/debian/rules b/debian/rules index cfd692a4..d6f1fc2b 100755 --- a/debian/rules +++ b/debian/rules @@ -46,7 +46,7 @@ # debmake generated override targets # Set options for ./configure -CONFIGURE_FLAGS += --enable-iu --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals +CONFIGURE_FLAGS += --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals override_dh_auto_configure: dh_auto_configure -- $(CONFIGURE_FLAGS) # @@ -56,8 +56,6 @@ override_dh_auto_configure: # See https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#bpp-dbg override_dh_strip: - dh_strip -posmo-sgsn --dbg-package=osmo-sgsn-dbg - dh_strip -posmo-gtphub --dbg-package=osmo-gtphub-dbg dh_strip -posmo-gbproxy --dbg-package=osmo-gbproxy-dbg # Print test results in case of a failure diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am index 2b5781a5..6773e89c 100644 --- a/doc/examples/Makefile.am +++ b/doc/examples/Makefile.am @@ -1,6 +1,4 @@ OSMOCONF_FILES = \ - osmo-gtphub/osmo-gtphub.cfg \ - osmo-sgsn/osmo-sgsn.cfg \ osmo-gbproxy/osmo-gbproxy.cfg osmoconfdir = $(sysconfdir)/osmocom diff --git a/doc/examples/osmo-gtphub/gtphub-example.txt b/doc/examples/osmo-gtphub/gtphub-example.txt deleted file mode 100644 index 17f6914d..00000000 --- a/doc/examples/osmo-gtphub/gtphub-example.txt +++ /dev/null @@ -1,90 +0,0 @@ -Here is a simple setup to test GTPHub operations. The IP addresses picked will -work well only on a system that creates local addresses (127.0.0.123) on the -fly (like linux) -- you may pick of course different IP addresses. - -Overview of the example setup: - - sgsnemu gtphub ggsn - 127.0.0.1 <--> 127.0.0.3 127.0.0.4 <--> 127.0.0.2 - -Prerequisites: openggsn. - -Have a local directory where you store config files and from which you launch -the GSNs and the hub (they will store restart counter files in that dir). -In it, have these config files: - -ggsn.conf: - - # GGSN local address - listen 127.0.0.2 - - # End User Addresses are picked from this range - net 10.23.42.0/24 - - pcodns1 8.8.8.8 - - logfile /tmp/foo - -gtphub.conf: - - gtphub - bind-to-sgsns 127.0.0.3 - bind-to-ggsns 127.0.0.4 - ggsn-proxy 127.0.0.2 - end - - -( -You may omit the ggsn-proxy if GRX ares is working, or if you add the GRX -address and GGSN IP address to /etc/hosts something like: - - 127.0.0.2 internet.mnc070.mcc901.gprs - -) - - -Once the config files are in place, start the programs, in separate terminals. -GGSN and SGSN need to be started with root priviliges to be able to create tun -interfaces. GTPHub may run as unprivileged user. - -The LD_LIBRARY_PATH below may be needed if OpenGGSN installed to /usr/local. - - -1. GGSN: - - sudo -s - cd - LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/ggsn -f -c ./ggsn.conf - -2. GTPHub: - - cd - path/to/openbsc/openbsc/src/gtphub/osmo-gtphub -c gtphub.conf #-e 1 #for DEBUG level - -3. SGSN tests: - - sudo -s - cd - /usr/local/bin/sgsnemu --createif -l 127.0.0.1 -r 127.0.0.3 --imsi 420001214365100 --contexts=3 - -Add more SGSNs using different IMSIs and local ports (if the same IMSI is used, -the GGSN will reuse TEIs and tunnels will be discarded automatically): - - /usr/local/bin/sgsnemu --createif -l 127.0.0.11 -r 127.0.0.3 --imsi 420001214365300 --contexts=3 - -This shows the basic setup of GTPHub. Testing internet traffic via sgsnemu -still needs some effort to announce a mobile subscriber or the like (I have -used a real BTS, osmo-sgsn and a testing SIM in a web phone, instead). - -The core capability of GTPHub is to manage more than two GSNs, e.g. an SGSN -contacting various GGSNs over the single GTPHub link. You would configure the -SGSN to use one fixed GGSN (sending to gtphub) and gtphub will resolve the -GGSNs once it has received the messages. So the SGSN may be behind NAT (add -"sgsn-use-sender" to gtphub.conf) and communicate to various GGSNs over a -single link to gtphub. - -I hope this helps to get you going. -Any suggestions/patches are welcome! - -~Neels - diff --git a/doc/examples/osmo-gtphub/osmo-gtphub-1iface.cfg b/doc/examples/osmo-gtphub/osmo-gtphub-1iface.cfg deleted file mode 100644 index 3913d2c3..00000000 --- a/doc/examples/osmo-gtphub/osmo-gtphub-1iface.cfg +++ /dev/null @@ -1,25 +0,0 @@ -! -! Osmocom gtphub configuration -! -! This file is used for VTY tests, referenced by openbsc/osmoappdesc.py -! For the test, try to use most config commands. -! - -line vty - no login - -gtphub - ! Local addresses to listen on and send from, both on one interface. - ! The side towards SGSN uses nonstandard ports. - bind-to-sgsns ctrl 127.0.0.1 12123 user 127.0.0.1 12153 - ! The GGSN side with standard ports. - bind-to-ggsns 127.0.0.1 - - ! Proxy: unconditionally direct all traffic to... - sgsn-proxy 127.0.0.4 - - ! Proxy with nonstandard ports or separate IPs: - ggsn-proxy ctrl 127.0.0.3 2123 user 127.0.0.5 2152 - - ! Add a name server for GGSN resolution - grx-dns-add 192.168.0.1 diff --git a/doc/examples/osmo-gtphub/osmo-gtphub.cfg b/doc/examples/osmo-gtphub/osmo-gtphub.cfg deleted file mode 100644 index 0bb63e31..00000000 --- a/doc/examples/osmo-gtphub/osmo-gtphub.cfg +++ /dev/null @@ -1,25 +0,0 @@ -! -! Osmocom gtphub configuration -! - -line vty - no login - -gtphub - ! Local addresses to listen on and send from, each on standard ports - ! 2123 and 2152. Setting these addresses is mandatory. - bind-to-sgsns 127.0.0.10 - bind-to-ggsns 127.0.0.2 - - ! Local nonstandard ports or separate IPs: - !bind-to-sgsns ctrl 127.0.0.1 2342 user 127.0.0.1 4223 - - ! Proxy: unconditionally direct all traffic to... - !ggsn-proxy 127.0.0.3 - !sgsn-proxy 127.0.0.4 - - ! Proxy with nonstandard ports or separate IPs: - !ggsn-proxy ctrl 127.0.0.3 2123 user 127.0.0.5 2152 - - ! Add a name server for GGSN resolution - !grx-dns-add 192.168.0.1 diff --git a/doc/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg b/doc/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg deleted file mode 100644 index 7abe7b38..00000000 --- a/doc/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg +++ /dev/null @@ -1,29 +0,0 @@ -! -! Osmocom SGSN configuration -! -! -line vty - no login -! -sgsn - gtp local-ip 127.0.0.1 - ggsn 0 remote-ip 127.0.0.2 - ggsn 0 gtp-version 1 - ggsn 0 echo-interval 60 - authentication optional - auth-policy accept-all -! -ns - timer tns-block 3 - timer tns-block-retries 3 - timer tns-reset 3 - timer tns-reset-retries 3 - timer tns-test 30 - timer tns-alive 3 - timer tns-alive-retries 10 - bind udp local - listen 127.0.0.1 23000 - accept-ipaccess -! -bssgp -! diff --git a/doc/examples/osmo-sgsn/osmo-sgsn.cfg b/doc/examples/osmo-sgsn/osmo-sgsn.cfg deleted file mode 100644 index 11413c1b..00000000 --- a/doc/examples/osmo-sgsn/osmo-sgsn.cfg +++ /dev/null @@ -1,31 +0,0 @@ -! -! Osmocom SGSN configuration -! -! -line vty - no login -! -sgsn - gtp local-ip 127.0.0.1 - ggsn 0 remote-ip 127.0.0.2 - ggsn 0 gtp-version 1 - ggsn 0 echo-interval 60 - authentication required - auth-policy remote - gsup remote-ip 127.0.0.1 - gsup remote-port 4222 -! -ns - timer tns-block 3 - timer tns-block-retries 3 - timer tns-reset 3 - timer tns-reset-retries 3 - timer tns-test 30 - timer tns-alive 3 - timer tns-alive-retries 10 - bind udp local - listen 127.0.0.1 23000 - accept-ipaccess -! -bssgp -! diff --git a/doc/examples/osmo-sgsn/osmo-sgsn_custom-sccp.cfg b/doc/examples/osmo-sgsn/osmo-sgsn_custom-sccp.cfg deleted file mode 100644 index fd5a2056..00000000 --- a/doc/examples/osmo-sgsn/osmo-sgsn_custom-sccp.cfg +++ /dev/null @@ -1,39 +0,0 @@ -! -! Osmocom SGSN configuration -! -! -line vty - no login -! -cs7 instance 0 - point-code 0.23.4 - asp asp-clnt-OsmoSGSN-A 2905 0 m3ua - remote-ip 172.18.8.200 ! where to reach the STP - as as-clnt-OsmoSGSN-A m3ua - asp asp-clnt-OsmoSGSN-A - routing-key 3 0.23.4 -sgsn - gtp local-ip 127.0.0.1 - ggsn 0 remote-ip 127.0.0.2 - ggsn 0 gtp-version 1 - ggsn 0 echo-interval 60 - authentication required - auth-policy remote - gsup remote-ip 127.0.0.1 - gsup remote-port 4222 - cs7-instance-iu 0 -! -ns - timer tns-block 3 - timer tns-block-retries 3 - timer tns-reset 3 - timer tns-reset-retries 3 - timer tns-test 30 - timer tns-alive 3 - timer tns-alive-retries 10 - bind udp local - listen 127.0.0.1 23000 - accept-ipaccess -! -bssgp -! diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100644 index 00000000..9d963a02 --- /dev/null +++ b/include/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = \ + osmocom \ + $(NULL) diff --git a/include/osmocom/Makefile.am b/include/osmocom/Makefile.am new file mode 100644 index 00000000..09db97a9 --- /dev/null +++ b/include/osmocom/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = \ + sgsn \ + $(NULL) diff --git a/include/osmocom/sgsn/Makefile.am b/include/osmocom/sgsn/Makefile.am new file mode 100644 index 00000000..68027409 --- /dev/null +++ b/include/osmocom/sgsn/Makefile.am @@ -0,0 +1,3 @@ +noinst_HEADERS = \ + gb_proxy.h \ + $(NULL) diff --git a/src/Makefile.am b/src/Makefile.am index 1500e117..c08d40fd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -11,11 +11,8 @@ AM_CFLAGS = \ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOCTRL_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOGB_CFLAGS) \ - $(LIBOSMOGSUPCLIENT_CFLAGS) \ $(COVERAGE_CFLAGS) \ - $(LIBGTP_CFLAGS) \ $(NULL) bin_PROGRAMS = \ @@ -35,6 +32,10 @@ osmo_gbproxy_LDADD = \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOCTRL_LIBS) \ $(LIBOSMOGB_LIBS) \ - $(LIBGTP_LIBS) \ -lrt \ $(NULL) + +noinst_HEADERS = \ + debug.h \ + vty.h \ + $(NULL) diff --git a/src/debug.h b/src/debug.h new file mode 100644 index 00000000..9a686cb6 --- /dev/null +++ b/src/debug.h @@ -0,0 +1,33 @@ +#pragma once + +#include +#include + +#define DEBUG +#include + +/* Debug Areas of the code */ +enum { + DMM, + DPAG, + DMEAS, + DREF, + DGPRS, + DNS, + DLLC, + DSNDCP, + DSLHC, + DCTRL, + DFILTER, + DGTPHUB, + DRANAP, + DSUA, + DV42BIS, + DIUCS, + DSIGTRAN, + DGTP, + DOBJ, + Debug_LastEntry, +}; + +extern const struct log_info log_info; diff --git a/src/gb_proxy.c b/src/gb_proxy.c index c882eb06..e8a78f26 100644 --- a/src/gb_proxy.c +++ b/src/gb_proxy.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -49,14 +50,10 @@ #include #include -#include -#include -#include +#include "debug.h" #include -#include #include -#include extern void *tall_sgsn_ctx; @@ -1546,4 +1543,4 @@ int gbproxy_init_config(struct gbproxy_config *cfg) osmo_fsm_log_timeouts(true); return 0; -} \ No newline at end of file +} diff --git a/src/gb_proxy_ctrl.c b/src/gb_proxy_ctrl.c index 45616346..794afd74 100644 --- a/src/gb_proxy_ctrl.c +++ b/src/gb_proxy_ctrl.c @@ -29,7 +29,8 @@ #include #include #include -#include + +#include "debug.h" extern vector ctrl_node_vec; diff --git a/src/gb_proxy_main.c b/src/gb_proxy_main.c index b76e0fbb..7c6f1d2c 100644 --- a/src/gb_proxy_main.c +++ b/src/gb_proxy_main.c @@ -37,13 +37,13 @@ #include #include #include +#include #include #include -#include -#include -#include +#include "debug.h" +#include "vty.h" #include #include @@ -57,7 +57,7 @@ #include #include -#include "../../bscconfig.h" +#include "../bscconfig.h" #define _GNU_SOURCE #include diff --git a/src/gb_proxy_peer.c b/src/gb_proxy_peer.c index 7d6ba864..e276c85d 100644 --- a/src/gb_proxy_peer.c +++ b/src/gb_proxy_peer.c @@ -22,7 +22,7 @@ #include -#include +#include "debug.h" #include #include diff --git a/src/gb_proxy_vty.c b/src/gb_proxy_vty.c index 7ae65d20..fd4692d9 100644 --- a/src/gb_proxy_vty.c +++ b/src/gb_proxy_vty.c @@ -38,10 +38,9 @@ #include #include -#include +#include "debug.h" #include -#include -#include +#include "vty.h" #include #include diff --git a/src/vty.h b/src/vty.h new file mode 100644 index 00000000..d2e3d9a7 --- /dev/null +++ b/src/vty.h @@ -0,0 +1,9 @@ +#pragma once + +#include + +enum bsc_vty_node { + GBPROXY_NODE = _LAST_OSMOVTY_NODE + 1, + SGSN_NODE, + GTPHUB_NODE, +}; diff --git a/tests/Makefile.am b/tests/Makefile.am index 32ed4725..b0e2a74f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,11 +1,4 @@ SUBDIRS = \ - gprs \ - gtphub \ - sgsn \ - xid \ - sndcp_xid \ - slhc \ - v42bis \ $(NULL) # The `:;' works around a Bash 3.2 bug when the output is not writeable. @@ -32,7 +25,6 @@ EXTRA_DIST = \ $(TESTSUITE) \ vty_test_runner.py \ ctrl_test_runner.py \ - osmo-sgsn_test-nodes.vty \ osmo-gbproxy_test-nodes.vty \ osmo-gbproxy-pool_test-nodes.vty \ $(NULL) @@ -70,10 +62,6 @@ vty-transcript-test: -n OsmoGbProxy -p 4246 \ -r "$(top_builddir)/src/gbproxy/osmo-gbproxy -c $(top_srcdir)/doc/examples/osmo-gbproxy/osmo-gbproxy-pool.cfg" \ $(U) $${T:-$(srcdir)/osmo-gbproxy-pool_test-nodes.vty} - osmo_verify_transcript_vty.py -v \ - -n OsmoSGSN -p 4245 \ - -r "$(top_builddir)/src/sgsn/osmo-sgsn -c $(top_srcdir)/doc/examples/osmo-sgsn/osmo-sgsn.cfg" \ - $(U) $${T:-$(srcdir)/osmo-sgsn*.vty} rm -f $(builddir)/sms.db $(builddir)/gsn_restart # don't run multiple tests concurrently so that the ports don't conflict diff --git a/tests/gprs/Makefile.am b/tests/gprs/Makefile.am deleted file mode 100644 index 902313f2..00000000 --- a/tests/gprs/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOABIS_CFLAGS) - -EXTRA_DIST = gprs_test.ok - -noinst_PROGRAMS = gprs_test - -gprs_test_SOURCES = gprs_test.c $(top_srcdir)/src/gprs/gprs_utils.c - -gprs_test_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) diff --git a/tests/gprs/gprs_test.c b/tests/gprs/gprs_test.c deleted file mode 100644 index 99e3ea51..00000000 --- a/tests/gprs/gprs_test.c +++ /dev/null @@ -1,141 +0,0 @@ -#include -#include -#include - -#include -#include - -#include - -#include -#include - -#define ASSERT_FALSE(x) if (x) { printf("Should have returned false.\n"); abort(); } -#define ASSERT_TRUE(x) if (!x) { printf("Should have returned true.\n"); abort(); } - -/** - * GSM 04.64 8.4.2 Receipt of unacknowledged information - */ -static int nu_is_retransmission(uint16_t nu, uint16_t vur) -{ - int ret = gprs_llc_is_retransmit(nu, vur); - printf("N(U) = %d, V(UR) = %d => %s\n", nu, vur, - ret == 1 ? "retransmit" : "new"); - return ret; -} - -static void test_8_4_2() -{ - printf("Testing gprs_llc_is_retransmit.\n"); - - ASSERT_FALSE(nu_is_retransmission(0, 0)); - ASSERT_TRUE (nu_is_retransmission(0, 1)); - - /* expect 1... check for retransmissions */ - ASSERT_TRUE (nu_is_retransmission(0, 1)); - ASSERT_TRUE (nu_is_retransmission(511, 1)); - ASSERT_TRUE (nu_is_retransmission(483, 1)); - ASSERT_TRUE (nu_is_retransmission(482, 1)); - ASSERT_FALSE(nu_is_retransmission(481, 1)); - - /* expect 511... check for retransmissions */ - ASSERT_FALSE(nu_is_retransmission(0, 240)); // ahead - ASSERT_FALSE(nu_is_retransmission(0, 511)); // ahead - ASSERT_FALSE(nu_is_retransmission(1, 511)); // ahead - ASSERT_FALSE(nu_is_retransmission(511, 511)); // same - ASSERT_TRUE (nu_is_retransmission(510, 511)); // behind - ASSERT_TRUE (nu_is_retransmission(481, 511)); // behind - ASSERT_FALSE(nu_is_retransmission(479, 511)); // wrapped -} - -static void test_gprs_timer_enc_dec(void) -{ - int i, u, secs, tmr; - const int upper_secs_test_limit = 12000; - int dec_secs, last_dec_secs = -1; - - printf("Test GPRS timer decoding/encoding\n"); - - /* Check gprs_tmr_to_secs with all 256 encoded values */ - for (u = 0; u <= GPRS_TMR_DEACTIVATED; u += 32) { - fprintf(stderr, "Testing decoding with timer value unit %u\n", - u / 32); - for (i = 0; i < 32; i++) { - switch (u) { - case GPRS_TMR_2SECONDS: - OSMO_ASSERT(gprs_tmr_to_secs(u + i) == 2 * i); - break; - - default: - case GPRS_TMR_MINUTE: - OSMO_ASSERT(gprs_tmr_to_secs(u + i) == 60 * i); - break; - - case GPRS_TMR_6MINUTE: - OSMO_ASSERT(gprs_tmr_to_secs(u + i) == 360 * i); - break; - - case GPRS_TMR_DEACTIVATED: - OSMO_ASSERT(gprs_tmr_to_secs(u + i) == -1); - break; - } - - OSMO_ASSERT(gprs_tmr_to_secs(u + i) < upper_secs_test_limit); - } - } - - /* Check gprs_secs_to_tmr_floor for secs that can exactly be - * represented as GPRS timer values */ - for (i = 0; i < GPRS_TMR_DEACTIVATED; i++) { - int j; - secs = gprs_tmr_to_secs(i); - tmr = gprs_secs_to_tmr_floor(secs); - OSMO_ASSERT(secs == gprs_tmr_to_secs(tmr)); - - /* Check that the highest resolution is used */ - for (j = 0; j < tmr; j++) - OSMO_ASSERT(secs != gprs_tmr_to_secs(j)); - } - OSMO_ASSERT(GPRS_TMR_DEACTIVATED == gprs_secs_to_tmr_floor(-1)); - - /* Check properties of gprs_secs_to_tmr_floor */ - for (secs = 0; secs <= upper_secs_test_limit; secs++) { - int tmr = gprs_secs_to_tmr_floor(secs); - int delta_secs = gprs_tmr_to_secs((tmr & ~0x1f) | 1); - dec_secs = gprs_tmr_to_secs(tmr); - - /* Check floor */ - OSMO_ASSERT(dec_secs <= secs); - /* Check monotonicity */ - OSMO_ASSERT(dec_secs >= last_dec_secs); - /* Check max distance (<= resolution) */ - OSMO_ASSERT(dec_secs - last_dec_secs <= delta_secs); - - last_dec_secs = dec_secs; - } -} - -const struct log_info_cat default_categories[] = { - [DGPRS] = { - .name = "DGPRS", - .description = "GPRS Packet Service", - .enabled = 0, .loglevel = LOGL_DEBUG, - }, -}; - -static struct log_info info = { - .cat = default_categories, - .num_cat = ARRAY_SIZE(default_categories), -}; - -int main(int argc, char **argv) -{ - void *ctx = talloc_named_const(NULL, 0, "gprs_test"); - osmo_init_logging2(ctx, &info); - - test_8_4_2(); - test_gprs_timer_enc_dec(); - - printf("Done.\n"); - return EXIT_SUCCESS; -} diff --git a/tests/gprs/gprs_test.ok b/tests/gprs/gprs_test.ok deleted file mode 100644 index da7888c6..00000000 --- a/tests/gprs/gprs_test.ok +++ /dev/null @@ -1,17 +0,0 @@ -Testing gprs_llc_is_retransmit. -N(U) = 0, V(UR) = 0 => new -N(U) = 0, V(UR) = 1 => retransmit -N(U) = 0, V(UR) = 1 => retransmit -N(U) = 511, V(UR) = 1 => retransmit -N(U) = 483, V(UR) = 1 => retransmit -N(U) = 482, V(UR) = 1 => retransmit -N(U) = 481, V(UR) = 1 => new -N(U) = 0, V(UR) = 240 => new -N(U) = 0, V(UR) = 511 => new -N(U) = 1, V(UR) = 511 => new -N(U) = 511, V(UR) = 511 => new -N(U) = 510, V(UR) = 511 => retransmit -N(U) = 481, V(UR) = 511 => retransmit -N(U) = 479, V(UR) = 511 => new -Test GPRS timer decoding/encoding -Done. diff --git a/tests/gtphub/Makefile.am b/tests/gtphub/Makefile.am deleted file mode 100644 index fea01e0d..00000000 --- a/tests/gtphub/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -AM_CPPFLAGS = \ - $(all_includes) \ - -I$(top_srcdir)/include \ - $(NULL) - -AM_CFLAGS = \ - -Wall \ - -ggdb3 \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBGTP_CFLAGS) \ - $(NULL) - -EXTRA_DIST = \ - gtphub_test.ok \ - $(NULL) - -noinst_PROGRAMS = \ - gtphub_test \ - $(NULL) - -gtphub_test_SOURCES = \ - gtphub_test.c \ - $(NULL) - -gtphub_test_LDFLAGS = \ - -Wl,--wrap=gtphub_resolve_ggsn_addr \ - -Wl,--wrap=gtphub_ares_init \ - -Wl,--wrap=gtphub_write \ - $(NULL) - -gtphub_test_LDADD = \ - $(top_builddir)/src/gtphub/gtphub.o \ - $(top_builddir)/src/gprs/gprs_utils.o \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBGTP_LIBS) \ - -lrt \ - $(NULL) diff --git a/tests/gtphub/gtphub_test.c b/tests/gtphub/gtphub_test.c deleted file mode 100644 index dab39775..00000000 --- a/tests/gtphub/gtphub_test.c +++ /dev/null @@ -1,1791 +0,0 @@ -/* Test the GTP hub */ - -/* (C) 2015 by sysmocom s.f.m.c. GmbH - * All Rights Reserved - * - * Author: Neels Hofmeyr - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include - -#define ZERO_STRUCT(struct_pointer) memset(struct_pointer, '\0', \ - sizeof(*(struct_pointer))) - -#define LVL2_ASSERT(exp) LVL2_ASSERT_R(exp, return 0) -#define LVL2_ASSERT_R(exp, ret) \ - if (!(exp)) { \ - fprintf(stderr, "LVL2 Assert failed %s %s:%d\n", #exp, \ - __FILE__, __LINE__); \ - osmo_generate_backtrace(); \ - ret; \ - } - -/* Convenience makro, note: only within this C file. */ -#define LOG(label) \ - { fprintf(stderr, "\n" label "\n"); \ - printf(label "\n"); } - -void gtphub_init(struct gtphub *hub); -void gtphub_free(struct gtphub *hub); - -extern void *osmo_gtphub_ctx; - -static void nr_mapping_free(struct expiring_item *e) -{ - struct nr_mapping *m = container_of(e, struct nr_mapping, - expiry_entry); - nr_mapping_del(m); - talloc_free(m); -} - -static struct nr_mapping *nr_mapping_alloc(void) -{ - struct nr_mapping *m; - m = talloc(osmo_gtphub_ctx, struct nr_mapping); - nr_mapping_init(m); - m->expiry_entry.del_cb = nr_mapping_free; - return m; -} - -static struct nr_mapping *nr_map_have(struct nr_map *map, void *origin, - nr_t orig, time_t now) -{ - struct nr_mapping *mapping; - - mapping = nr_map_get(map, origin, orig); - if (!mapping) { - mapping = nr_mapping_alloc(); - mapping->origin = origin; - mapping->orig = orig; - nr_map_add(map, mapping, now); - } - - return mapping; -} - -static nr_t nr_map_verify(const struct nr_map *map, void *origin, nr_t orig, - nr_t expect_repl) -{ - struct nr_mapping *m; - m = nr_map_get(map, origin, orig); - - if (!m) { - printf("mapping not found for %p %d\n", origin, orig); - return 0; - } - - if (m->repl != expect_repl) { - printf("mapping found, but nr mismatches: expect %d, got %d\n", - (int)expect_repl, (int)m->repl); - return 0; - } - - return 1; -} - -static int nr_map_verify_inv(const struct nr_map *map, nr_t repl, - void *expect_origin, nr_t expect_orig) -{ - struct nr_mapping *m; - m = nr_map_get_inv(map, repl); - if (!m) { - printf("mapping not found for %d\n", (int)repl); - return 0; - } - - if (m->origin != expect_origin) { - printf("mapping found, but origin mismatches:" - " expect %p, got %p\n", - expect_origin, m->origin); - return 0; - } - - if (m->orig != expect_orig) { - printf("mapping found, but nr mismatches: expect %d, got %d\n", - (int)expect_orig, (int)m->orig); - return 0; - } - - return 1; -} - - -static void test_nr_map_basic(void) -{ - struct nr_pool _pool; - struct nr_pool *pool = &_pool; - struct nr_map _map; - struct nr_map *map = &_map; - - nr_pool_init(pool, 1, 1000); - nr_map_init(map, pool, NULL); - - OSMO_ASSERT(llist_empty(&map->mappings)); - -#define TEST_N_HALF 100 -#define TEST_N (2*TEST_N_HALF) -#define TEST_I 123 - uint32_t i, check_i; - uint32_t m[TEST_N]; - struct nr_mapping *mapping; - - /* create half of TEST_N mappings from one origin */ - void *origin1 = (void*)0x1234; - for (i = 0; i < TEST_N_HALF; i++) { - nr_t orig = TEST_I + i; - mapping = nr_map_have(map, origin1, orig, 0); - m[i] = mapping->repl; - OSMO_ASSERT(m[i] != 0); - OSMO_ASSERT(llist_count(&map->mappings) == (i+1)); - for (check_i = 0; check_i < i; check_i++) - OSMO_ASSERT(m[check_i] != m[i]); - } - OSMO_ASSERT(llist_count(&map->mappings) == TEST_N_HALF); - - /* create another TEST_N mappings with the same original numbers, but - * from a different origin */ - void *origin2 = (void*)0x5678; - for (i = 0; i < TEST_N_HALF; i++) { - int i2 = TEST_N_HALF + i; - nr_t orig = TEST_I + i; - mapping = nr_map_have(map, origin2, orig, 0); - m[i2] = mapping->repl; - OSMO_ASSERT(m[i2] != 0); - OSMO_ASSERT(llist_count(&map->mappings) == (i2+1)); - for (check_i = 0; check_i < i2; check_i++) - OSMO_ASSERT(m[check_i] != m[i2]); - } - OSMO_ASSERT(llist_count(&map->mappings) == TEST_N); - - /* verify mappings */ - for (i = 0; i < TEST_N_HALF; i++) { - nr_t orig = TEST_I + i; - { - OSMO_ASSERT(nr_map_verify(map, origin1, orig, m[i])); - OSMO_ASSERT(nr_map_verify_inv(map, m[i], origin1, - orig)); - } - { - int i2 = TEST_N_HALF + i; - OSMO_ASSERT(nr_map_verify(map, origin2, orig, m[i2])); - OSMO_ASSERT(nr_map_verify_inv(map, m[i2], origin2, - orig)); - } - } - - /* remove all mappings */ - for (i = 0; i < TEST_N_HALF; i++) { - OSMO_ASSERT(llist_count(&map->mappings) == (TEST_N - 2*i)); - - nr_t orig = TEST_I + i; - nr_mapping_del(nr_map_get(map, origin1, orig)); - nr_mapping_del(nr_map_get(map, origin2, orig)); - } - OSMO_ASSERT(llist_empty(&map->mappings)); -#undef TEST_N -#undef TEST_I -} - -static int nr_map_is(struct nr_map *map, const char *str) -{ - static char buf[4096]; - char *pos = buf; - size_t len = sizeof(buf); - struct nr_mapping *m; - llist_for_each_entry(m, &map->mappings, entry) { - size_t wrote = snprintf(pos, len, "(%u->%u@%d), ", - m->orig, - m->repl, - (int)m->expiry_entry.expiry); - OSMO_ASSERT(wrote < len); - pos += wrote; - len -= wrote; - } - *pos = '\0'; - - if (strncmp(buf, str, sizeof(buf)) != 0) { - printf("FAILURE: nr_map_is() mismatches expected value:\n" - "expected: \"%s\"\n" - "is: \"%s\"\n", - str, buf); - return 0; - } - return 1; -} - -static int test_nr_map_wrap_with(nr_t nr_min, nr_t nr_max, nr_t repl_last, - nr_t orig_start, int orig_n, - const char *expect) -{ - struct nr_pool _pool; - struct nr_pool *pool = &_pool; - struct nr_map _map; - struct nr_map *map = &_map; - - nr_pool_init(pool, nr_min, nr_max); - nr_map_init(map, pool, NULL); - - pool->last_nr = repl_last; - - void *origin = (void*)0x1234; - - int i; - for (i = 0; i < orig_n; i++) - LVL2_ASSERT(nr_map_have(map, origin, orig_start + i, 0)); - - LVL2_ASSERT(nr_map_is(map, expect)); - - nr_map_clear(map); - return 1; -} - -static void test_nr_map_wrap(void) -{ - OSMO_ASSERT(test_nr_map_wrap_with( - 0, UINT_MAX, UINT_MAX - 2, - 1, 5, - "(1->4294967294@0), " - "(2->4294967295@0), " - "(3->0@0), " - "(4->1@0), " - "(5->2@0), " - )); - OSMO_ASSERT(test_nr_map_wrap_with( - 5, 10, 8, - 1, 5, - "(1->9@0), (2->10@0), (3->5@0), (4->6@0), (5->7@0), " - )); -} - -static void test_expiry(void) -{ - struct expiry expiry; - struct nr_pool pool; - struct nr_map map; - int i; - - expiry_init(&expiry, 30); - nr_pool_init(&pool, 1, 1000); - nr_map_init(&map, &pool, &expiry); - OSMO_ASSERT(nr_map_is(&map, "")); - - /* tick on empty map */ - OSMO_ASSERT(expiry_tick(&expiry, 10000) == 0); - OSMO_ASSERT(nr_map_is(&map, "")); - -#define MAP1 \ - "(10->1@10040), " \ - "" - -#define MAP2 \ - "(20->2@10050), " \ - "(21->3@10051), " \ - "(22->4@10052), " \ - "(23->5@10053), " \ - "(24->6@10054), " \ - "(25->7@10055), " \ - "(26->8@10056), " \ - "(27->9@10057), " \ - "" - -#define MAP3 \ - "(420->10@10072), " \ - "(421->11@10072), " \ - "(422->12@10072), " \ - "(423->13@10072), " \ - "(424->14@10072), " \ - "(425->15@10072), " \ - "(426->16@10072), " \ - "(427->17@10072), " \ - "" - - /* add mapping at time 10010. */ - nr_map_have(&map, 0, 10, 10010); - OSMO_ASSERT(nr_map_is(&map, MAP1)); - - /* tick on unexpired item. */ - OSMO_ASSERT(expiry_tick(&expiry, 10010) == 0); - OSMO_ASSERT(expiry_tick(&expiry, 10011) == 0); - OSMO_ASSERT(nr_map_is(&map, MAP1)); - - /* Spread mappings at 10020, 10021, ... 10027. */ - for (i = 0; i < 8; i++) - nr_map_have(&map, 0, 20 + i, 10020 + i); - OSMO_ASSERT(nr_map_is(&map, MAP1 MAP2)); - - /* tick on unexpired items. */ - OSMO_ASSERT(expiry_tick(&expiry, 10030) == 0); - OSMO_ASSERT(expiry_tick(&expiry, 10039) == 0); - OSMO_ASSERT(nr_map_is(&map, MAP1 MAP2)); - - /* expire the first item (from 10010). */ - OSMO_ASSERT(expiry_tick(&expiry, 10010 + 30) == 1); - OSMO_ASSERT(nr_map_is(&map, MAP2)); - - /* again nothing to expire */ - OSMO_ASSERT(expiry_tick(&expiry, 10041) == 0); - OSMO_ASSERT(nr_map_is(&map, MAP2)); - - /* Mappings all at the same time. */ - for (i = 0; i < 8; i++) - nr_map_have(&map, 0, 420 + i, 10042); - OSMO_ASSERT(nr_map_is(&map, MAP2 MAP3)); - - /* Eight to expire, were added further above to be chronologically - * correct, at 10020..10027. */ - OSMO_ASSERT(expiry_tick(&expiry, 10027 + 30) == 8); - OSMO_ASSERT(nr_map_is(&map, MAP3)); - - /* again nothing to expire */ - OSMO_ASSERT(expiry_tick(&expiry, 10027 + 30) == 0); - OSMO_ASSERT(nr_map_is(&map, MAP3)); - - /* Eight to expire, from 10042. Now at 10042 + 30: */ - OSMO_ASSERT(expiry_tick(&expiry, 10042 + 30) == 8); - OSMO_ASSERT(nr_map_is(&map, "")); - -#undef MAP1 -#undef MAP2 -#undef MAP3 -} - -char resolve_ggsn_got_imsi[GSM23003_IMSI_MAX_DIGITS+1]; -char resolve_ggsn_got_ni[GSM_APN_LENGTH]; - -struct sgsn_sockaddr resolved_ggsn_addr; -static int resolve_to_ggsn(const char *addr, uint16_t port) -{ - LVL2_ASSERT(sgsn_sockaddr_init_udp(&resolved_ggsn_addr, - addr, port) - == 0); - return 1; -} - -struct sgsn_sockaddr resolved_sgsn_addr; -static int resolve_to_sgsn(const char *addr, uint16_t port) -{ - LVL2_ASSERT(sgsn_sockaddr_init_udp(&resolved_sgsn_addr, - addr, port) - == 0); - return 1; -} - -struct sgsn_sockaddr sgsn_sender; -static int send_from_sgsn(const char *addr, uint16_t port) -{ - LVL2_ASSERT(sgsn_sockaddr_init_udp(&sgsn_sender, - addr, port) - == 0); - return 1; -} - -struct sgsn_sockaddr ggsn_sender; -static int send_from_ggsn(const char *addr, uint16_t port) -{ - LVL2_ASSERT(sgsn_sockaddr_init_udp(&ggsn_sender, - addr, port) - == 0); - return 1; -} - - -/* override, requires '-Wl,--wrap=gtphub_resolve_ggsn_addr' */ -struct gtphub_peer_port *__real_gtphub_resolve_ggsn_addr(struct gtphub *hub, - const char *imsi_str, - const char *apn_ni_str); - -struct gtphub_peer_port *__wrap_gtphub_resolve_ggsn_addr(struct gtphub *hub, - const char *imsi_str, - const char *apn_ni_str) -{ - struct gsn_addr resolved_gsna; - uint16_t resolved_port; - - OSMO_ASSERT(gsn_addr_from_sockaddr(&resolved_gsna, &resolved_port, - &resolved_ggsn_addr) == 0); - - struct gtphub_peer_port *pp; - pp = gtphub_port_have(hub, &hub->to_gsns[GTPH_SIDE_GGSN][GTPH_PLANE_CTRL], - &resolved_gsna, resolved_port); - printf("- __wrap_gtphub_resolve_ggsn_addr():\n" - " returning GGSN addr from imsi %s ni %s: %s\n", - imsi_str, apn_ni_str, gtphub_port_str(pp)); - - if (!imsi_str) - imsi_str = "(null)"; - osmo_strlcpy(resolve_ggsn_got_imsi, imsi_str, - sizeof(resolve_ggsn_got_imsi)); - - if (!apn_ni_str) - apn_ni_str = "(null)"; - osmo_strlcpy(resolve_ggsn_got_ni, apn_ni_str, - sizeof(resolve_ggsn_got_ni)); - - return pp; -} - -#define was_resolved_for(IMSI,NI) _was_resolved_for(IMSI, NI, __FILE__, __LINE__) -static int _was_resolved_for(const char *imsi, const char *ni, const char - *file, int line) -{ - int cmp0 = strncmp(imsi, resolve_ggsn_got_imsi, - sizeof(resolve_ggsn_got_imsi)); - - if (cmp0 != 0) { - printf("\n%s:%d: was_resolved_for(): MISMATCH for IMSI\n" - " expecting: '%s'\n" - " got: '%s'\n\n", - file, - line, - imsi, resolve_ggsn_got_imsi); - } - - int cmp1 = strncmp(ni, resolve_ggsn_got_ni, - sizeof(resolve_ggsn_got_ni)); - if (cmp1 != 0) { - printf("\n%s:%d: was_resolved_for(): MISMATCH for NI\n" - " expecting: '%s'\n" - " got: '%s'\n\n", - file, - line, - ni, resolve_ggsn_got_ni); - } - - return (cmp0 == 0) && (cmp1 == 0); -} - -/* override, requires '-Wl,--wrap=gtphub_ares_init' */ -int __real_gtphub_ares_init(struct gtphub *hub); - -int __wrap_gtphub_ares_init(struct gtphub *hub) -{ - /* Do nothing. */ - return 0; -} - -/* override, requires '-Wl,--wrap=gtphub_write' */ -int __real_gtphub_write(const struct osmo_fd *to, - const struct sgsn_sockaddr *to_addr, - const uint8_t *buf, size_t buf_len); - -int __wrap_gtphub_write(const struct osmo_fd *to, - const struct sgsn_sockaddr *to_addr, - const uint8_t *buf, size_t buf_len) -{ - printf("Out-of-band gtphub_write(%d):\n" - "to %s\n" - "%s\n", - (int)buf_len, - sgsn_sockaddr_to_str(to_addr), - osmo_hexdump(buf, buf_len)); - return 0; -} - -#define buf_len 1024 -static uint8_t buf[buf_len]; -static uint8_t *reply_buf; - -static unsigned int msg(const char *hex) -{ - unsigned int l = osmo_hexparse(hex, buf, buf_len); - OSMO_ASSERT(l > 0); - return l; -} - -/* Compare static buf to given string constant. The amount of bytes is obtained - * from parsing the GTP header in buf. hex must match an osmo_hexdump() of the - * desired message. Return 1 if size and content match. */ -#define reply_is(MSG) _reply_is(MSG, __FILE__, __LINE__) -static int _reply_is(const char *hex, const char *file, int line) -{ - struct gtp1_header_long *h = (void*)reply_buf; - int len = ntoh16(h->length) + 8; - const char *dump = osmo_hexdump_nospc(reply_buf, len); - int cmp = strcmp(dump, hex); - - OSMO_ASSERT(dump && hex); - - if (cmp != 0) { - printf("\n%s:%d: reply_is(): MISMATCH\n" - " expecting:\n'%s'\n" - " got:\n'%s'\n\n", - file, - line, - hex, dump); - int i; - int l = strlen(hex); - int m = strlen(dump); - if (m < l) - l = m; - for (i = 0; i < l; i++) { - if (hex[i] != dump[i]) { - printf("First mismatch at position %d:\n" - " %s\n %s\n", i, hex + i, dump + i); - break; - } - } - } - return cmp == 0; -} - -#define same_addr(GOT, EXPECTED) _same_addr((GOT),(EXPECTED), __FILE__, __LINE__) -static int _same_addr(const struct sgsn_sockaddr *got, - const struct sgsn_sockaddr *expected, - const char *file, int line) -{ - int cmp = sgsn_sockaddr_cmp(got, expected); - if (!cmp) - return 1; - char buf[256]; - printf("\n%s:%d: addr_is(): MISMATCH\n" - " expecting: '%s'\n" - " got: '%s'\n\n", - file, line, - sgsn_sockaddr_to_str(expected), - sgsn_sockaddr_to_strb(got, buf, sizeof(buf))); - return 0; -} - - -time_t now; -static struct gtphub _hub; -static struct gtphub *hub = &_hub; - -static int setup_test_hub() -{ - /* Not really needed, but to make 100% sure... */ - ZERO_STRUCT(hub); - - gtphub_init(hub); - - /* Tell this mock gtphub its local address for this test. */ - LVL2_ASSERT(gsn_addr_from_str(&hub->to_gsns[GTPH_SIDE_SGSN][GTPH_PLANE_CTRL].local_addr, - "127.0.1.1") == 0); - LVL2_ASSERT(gsn_addr_from_str(&hub->to_gsns[GTPH_SIDE_SGSN][GTPH_PLANE_USER].local_addr, - "127.0.1.2") == 0); - LVL2_ASSERT(gsn_addr_from_str(&hub->to_gsns[GTPH_SIDE_GGSN][GTPH_PLANE_CTRL].local_addr, - "127.0.2.1") == 0); - LVL2_ASSERT(gsn_addr_from_str(&hub->to_gsns[GTPH_SIDE_GGSN][GTPH_PLANE_USER].local_addr, - "127.0.2.2") == 0); - - hub->restart_counter = 0x23; - now = 345; - LVL2_ASSERT(send_from_sgsn("192.168.42.23", 423)); - LVL2_ASSERT(resolve_to_ggsn("192.168.43.34", 2123)); - LVL2_ASSERT(send_from_ggsn("192.168.43.34", 434)); - LVL2_ASSERT(resolve_to_sgsn("192.168.42.23", 2123)); - -#define GGSNS_CTRL_FD 1 -#define GGSNS_USER_FD 2 -#define SGSNS_CTRL_FD 3 -#define SGSNS_USER_FD 4 - hub->to_gsns[GTPH_SIDE_GGSN][GTPH_PLANE_CTRL].ofd.priv_nr = GGSNS_CTRL_FD; - hub->to_gsns[GTPH_SIDE_GGSN][GTPH_PLANE_USER].ofd.priv_nr = GGSNS_USER_FD; - hub->to_gsns[GTPH_SIDE_SGSN][GTPH_PLANE_CTRL].ofd.priv_nr = SGSNS_CTRL_FD; - hub->to_gsns[GTPH_SIDE_SGSN][GTPH_PLANE_USER].ofd.priv_nr = SGSNS_USER_FD; - - return 1; -} - -static int clear_test_hub() -{ - /* expire all */ - gtphub_gc(hub, now + (60 * GTPH_EXPIRE_SLOWLY_MINUTES) + 1); - - int plane_idx; - plane_idx = GTPH_PLANE_CTRL; - LVL2_ASSERT(llist_empty(&hub->to_gsns[GTPH_SIDE_GGSN][plane_idx].peers)); - LVL2_ASSERT(llist_empty(&hub->to_gsns[GTPH_SIDE_SGSN][plane_idx].peers)); - plane_idx = GTPH_PLANE_USER; - LVL2_ASSERT(llist_empty(&hub->to_gsns[GTPH_SIDE_GGSN][plane_idx].peers)); - LVL2_ASSERT(llist_empty(&hub->to_gsns[GTPH_SIDE_SGSN][plane_idx].peers)); - - LVL2_ASSERT(llist_empty(&hub->tunnels)); - LVL2_ASSERT(llist_empty(&hub->pending_deletes)); - LVL2_ASSERT(llist_empty(&hub->ggsn_lookups)); - LVL2_ASSERT(llist_empty(&hub->resolved_ggsns)); - - gtphub_free(hub); - return 1; -} - -static int tunnels_are(const char *expect) -{ - static char buf[4096]; - char *pos = buf; - size_t len = sizeof(buf); - struct gtphub_tunnel *t; - llist_for_each_entry(t, &hub->tunnels, entry) { - size_t wrote = snprintf(pos, len, "%s @%d\n", - gtphub_tunnel_str(t), - (int)t->expiry_entry.expiry); - LVL2_ASSERT(wrote < len); - pos += wrote; - len -= wrote; - } - *pos = '\0'; - - if (strncmp(buf, expect, sizeof(buf)) != 0) { - fprintf(stderr, "FAILURE: tunnels_are() mismatches expected value:\n" - "EXPECTED:\n%s\n" - "IS:\n%s\n", - expect, buf); - LVL2_ASSERT("tunnels do not match expected listing."); - return 0; - } - return 1; -} - -static void test_echo(void) -{ - LOG("test_echo"); - OSMO_ASSERT(setup_test_hub()); - - now = 123; - - struct osmo_fd *to_ofd; - struct sgsn_sockaddr to_addr; - struct gtphub_peer_port *pp; - int send; - - const char *gtp_ping_from_sgsn = - "32" /* 0b001'1 0010: version 1, protocol GTP, with seq nr */ - "01" /* type 01: Echo request */ - "0004" /* length of 4 after header TEI */ - "00000000" /* header TEI == 0 in Echo */ - "abcd" /* some 2 octet sequence nr */ - "0000" /* N-PDU 0, no extension header (why is this here?) */ - ; - - const char *gtp_pong_to_sgsn = - "32" - "02" /* type 02: Echo response */ - "0006" /* length of 6 after header TEI */ - "00000000" /* header TEI == 0 in Echo */ - "abcd" /* same sequence nr */ - "0000" - "0e23" /* Recovery with restart counter */ - ; - - to_ofd = NULL; - ZERO_STRUCT(&to_addr); - send = gtphub_handle_buf(hub, GTPH_SIDE_SGSN, GTPH_PLANE_CTRL, - &sgsn_sender, buf, msg(gtp_ping_from_sgsn), - now, &reply_buf, &to_ofd, &to_addr); - OSMO_ASSERT(send > 0); - OSMO_ASSERT(to_addr.l); - OSMO_ASSERT(same_addr(&to_addr, &sgsn_sender)); - OSMO_ASSERT(to_ofd && (to_ofd->priv_nr == SGSNS_CTRL_FD)); - OSMO_ASSERT(reply_is(gtp_pong_to_sgsn)); - - pp = gtphub_port_find_sa(&hub->to_gsns[GTPH_SIDE_SGSN][GTPH_PLANE_CTRL], - &sgsn_sender); - /* We don't record Echo peers. */ - OSMO_ASSERT(!pp); - - const char *gtp_ping_from_ggsn = - "32" /* 0b001'1 0010: version 1, protocol GTP, with seq nr */ - "01" /* type 01: Echo request */ - "0004" /* length of 4 after header TEI */ - "00000000" /* header TEI == 0 in Echo */ - "cdef" /* some 2 octet sequence nr */ - "0000" /* N-PDU 0, no extension header (why is this here?) */ - ; - - const char *gtp_pong_to_ggsn = - "32" - "02" /* type 02: Echo response */ - "0006" /* length of 6 after header TEI */ - "00000000" /* header TEI == 0 in Echo */ - "cdef" /* same sequence nr */ - "0000" - "0e23" /* Recovery with restart counter */ - ; - - to_ofd = NULL; - ZERO_STRUCT(&to_addr); - send = gtphub_handle_buf(hub, GTPH_SIDE_GGSN, GTPH_PLANE_CTRL, - &ggsn_sender, buf, msg(gtp_ping_from_ggsn), - now, &reply_buf, &to_ofd, &to_addr); - OSMO_ASSERT(send > 0); - OSMO_ASSERT(same_addr(&to_addr, &ggsn_sender)); - OSMO_ASSERT(to_ofd && (to_ofd->priv_nr == GGSNS_CTRL_FD)); - OSMO_ASSERT(reply_is(gtp_pong_to_ggsn)); - - pp = gtphub_port_find_sa(&hub->to_gsns[GTPH_SIDE_GGSN][GTPH_PLANE_CTRL], - &sgsn_sender); - OSMO_ASSERT(!pp); - - - /* And all the same on the user plane. */ - - to_ofd = NULL; - ZERO_STRUCT(&to_addr); - send = gtphub_handle_buf(hub, GTPH_SIDE_SGSN, GTPH_PLANE_USER, - &sgsn_sender, buf, msg(gtp_ping_from_sgsn), - now, &reply_buf, &to_ofd, &to_addr); - OSMO_ASSERT(send > 0); - OSMO_ASSERT(to_addr.l); - OSMO_ASSERT(same_addr(&to_addr, &sgsn_sender)); - OSMO_ASSERT(to_ofd && (to_ofd->priv_nr == SGSNS_USER_FD)); - OSMO_ASSERT(reply_is(gtp_pong_to_sgsn)); - - pp = gtphub_port_find_sa(&hub->to_gsns[GTPH_SIDE_SGSN][GTPH_PLANE_USER], - &sgsn_sender); - OSMO_ASSERT(!pp); - - to_ofd = NULL; - ZERO_STRUCT(&to_addr); - send = gtphub_handle_buf(hub, GTPH_SIDE_GGSN, GTPH_PLANE_USER, - &ggsn_sender, buf, msg(gtp_ping_from_ggsn), - now, &reply_buf, &to_ofd, &to_addr); - OSMO_ASSERT(send > 0); - OSMO_ASSERT(same_addr(&to_addr, &ggsn_sender)); - OSMO_ASSERT(to_ofd && (to_ofd->priv_nr == GGSNS_USER_FD)); - OSMO_ASSERT(reply_is(gtp_pong_to_ggsn)); - - pp = gtphub_port_find_sa(&hub->to_gsns[GTPH_SIDE_GGSN][GTPH_PLANE_USER], - &sgsn_sender); - OSMO_ASSERT(!pp); - - - OSMO_ASSERT(clear_test_hub()); -} - - -#define MSG_PDP_CTX_REQ(len, seq, restart, imsi, tei_u, tei_c, apn, gsn_c, gsn_u) \ - "32" /* 0b001'1 0010: version 1, protocol GTP, with seq nr. */ \ - "10" /* type 16: Create PDP Context Request */ \ - len /* msg length = 8 + len (2 octets) */ \ - "00000000" /* No TEI yet */ \ - seq /* Sequence nr (2 octets) */ \ - "00" /* N-PDU 0 */ \ - "00" /* No extensions */ \ - /* IEs */ \ - "0e" restart /* 14: Recovery (restart counter: 1 octet) */ \ - "02" /* 2 = IMSI */ \ - imsi /* (8 octets) */ \ - "0f01" /* 15: Selection mode = MS provided APN, subscription not verified*/ \ - "10" /* 16: TEI Data I */ \ - tei_u /* (4 octets) */ \ - "11" /* 17: TEI Control Plane */ \ - tei_c /* (4 octets) */ \ - "1400" /* 20: NSAPI = 0*/ \ - "1a" /* 26: Charging Characteristics */ \ - "0800" \ - "80" /* 128: End User Address */ \ - "0002" /* length = 2: empty PDP Address */ \ - "f121" /* spare 0xf0, PDP organization 1, PDP type number 0x21 = 33 */ \ - "83" /* 131: Access Point Name */ \ - apn /* (2 octets length, N octets encoded APN-NI) */ \ - "84" /* 132: Protocol Configuration Options */ \ - "0015" /* length = 21 */ \ - "80c0231101010011036d69670868656d6d656c6967" \ - "85" /* 133: GSN Address */ \ - gsn_c /* (2 octets length, N octets addr) */ \ - "85" /* 133: GSN Address (second entry) */ \ - gsn_u /* (2 octets length, N octets addr) */ \ - "86" /* 134: MS International PSTN/ISDN Number (MSISDN) */ \ - "0007" /* length */ \ - "916407123254f6" /* 1946702123456(f) */ \ - "87" /* 135: Quality of Service (QoS) Profile */ \ - "0004" /* length */ \ - "00" /* priority */ \ - "0b921f" /* QoS profile data */ - -#define MSG_PDP_CTX_RSP(len, tei_h, seq, restart, tei_u, tei_c, gsn_c, gsn_u) \ - "32" \ - "11" /* Create PDP Context Response */ \ - len /* msg length = 8 + len (2 octets) */ \ - tei_h /* destination TEI (sent in req above) */ \ - seq /* mapped seq */ \ - "00" "00" \ - /* IEs */ \ - "01" /* 1: Cause */ \ - "80" /* value = 0b10000000 = response, no rejection. */ \ - "08" /* 8: Reordering Required */ \ - "00" /* not required. */ \ - "0e" restart /* 14: Recovery */ \ - "10" /* 16: TEI Data I */ \ - tei_u \ - "11" /* 17: TEI Control */ \ - tei_c \ - "7f" /* 127: Charging ID */ \ - "00000001" \ - "80" /* 128: End User Address */ \ - "0006" /* length = 6 */ \ - "f121" /* spare 0xf0, PDP organization 1, PDP type number 0x21 = 33 */ \ - "7f000002" \ - "84" /* 132: Protocol Configuration Options */ \ - "0014" /* len = 20 */ \ - "8080211002000010810608080808830600000000" \ - "85" /* 133: GSN Address (Ctrl) */ \ - gsn_c \ - "85" /* 133: GSN Address (User) */ \ - gsn_u \ - "87" /* 135: Quality of Service (QoS) Profile */ \ - "0004" /* length */ \ - "00" /* priority */ \ - "0b921f" /* QoS profile data */ - -#define msg_from_sgsn_c(A,B,C,D) msg_from_sgsn(GTPH_PLANE_CTRL, A,B,C,D) -#define msg_from_sgsn_u(A,B,C,D) msg_from_sgsn(GTPH_PLANE_USER, A,B,C,D) -static int msg_from_sgsn(int plane_idx, - struct sgsn_sockaddr *_sgsn_sender, - struct sgsn_sockaddr *ggsn_receiver, - const char *hex_from_sgsn, - const char *hex_to_ggsn) -{ - struct osmo_fd *ggsn_ofd = NULL; - struct sgsn_sockaddr ggsn_addr; - int send; - send = gtphub_handle_buf(hub, GTPH_SIDE_SGSN, plane_idx, _sgsn_sender, - buf, msg(hex_from_sgsn), now, - &reply_buf, &ggsn_ofd, &ggsn_addr); - LVL2_ASSERT(send > 0); - LVL2_ASSERT(same_addr(&ggsn_addr, ggsn_receiver)); - LVL2_ASSERT(reply_is(hex_to_ggsn)); - return 1; -} - -#define msg_from_ggsn_c(A,B,C,D) msg_from_ggsn(GTPH_PLANE_CTRL, A,B,C,D) -#define msg_from_ggsn_u(A,B,C,D) msg_from_ggsn(GTPH_PLANE_USER, A,B,C,D) -static int msg_from_ggsn(int plane_idx, - struct sgsn_sockaddr *ggsn_sender, - struct sgsn_sockaddr *sgsn_receiver, - const char *msg_from_ggsn, - const char *msg_to_sgsn) -{ - struct osmo_fd *sgsn_ofd; - struct sgsn_sockaddr sgsn_addr; - int send; - send = gtphub_handle_buf(hub, GTPH_SIDE_GGSN, plane_idx, ggsn_sender, - buf, msg(msg_from_ggsn), now, - &reply_buf, &sgsn_ofd, &sgsn_addr); - if (*msg_to_sgsn) { - LVL2_ASSERT(send > 0); - LVL2_ASSERT(same_addr(&sgsn_addr, sgsn_receiver)); - LVL2_ASSERT(reply_is(msg_to_sgsn)); - } - else - LVL2_ASSERT(send == 0); - return 1; -} - -static int create_pdp_ctx() -{ - const char *gtp_req_from_sgsn = - MSG_PDP_CTX_REQ("0068", - "abcd", - "60", - "42000121436587f9", - "00000123", - "00000321", - "0009""08696e7465726e6574", /* "(8)internet" */ - "0004""c0a82a17", /* same as default sgsn_sender */ - "0004""c0a82a17" - ); - const char *gtp_req_to_ggsn = - MSG_PDP_CTX_REQ("0068", - "6d31", /* mapped seq ("abcd") */ - "23", - "42000121436587f9", - "00000001", /* Data I: tunnel's TEI */ - "00000001", /* Control: tunnel's TEI */ - "0009""08696e7465726e6574", - "0004""7f000201", /* replaced with gtphub's ggsn ctrl */ - "0004""7f000202" /* replaced with gtphub's ggsn user */ - ); - - LVL2_ASSERT(msg_from_sgsn_c(&sgsn_sender, - &resolved_ggsn_addr, - gtp_req_from_sgsn, - gtp_req_to_ggsn)); - LVL2_ASSERT(was_resolved_for("240010123456789", "internet")); - - LVL2_ASSERT(tunnels_are( - "TEI=1:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34/(uninitialized) (TEI C=0 U=0)" - " @21945\n")); - - const char *gtp_resp_from_ggsn = - MSG_PDP_CTX_RSP("004e", - "00000001", /* destination TEI (sent in req above) */ - "6d31", /* mapped seq */ - "01", /* restart */ - "00000567", /* TEI U */ - "00000765", /* TEI C */ - "0004""c0a82b22", /* GSN addresses */ - "0004""c0a82b22" /* (== resolved_ggsn_addr) */ - ); - const char *gtp_resp_to_sgsn = - MSG_PDP_CTX_RSP("004e", - "00000321", /* unmapped TEI ("001") */ - "abcd", /* unmapped seq ("6d31") */ - "23", - "00000001", /* mapped TEI from GGSN ("567") */ - "00000001", /* mapped TEI from GGSN ("765") */ - "0004""7f000101", /* gtphub's address towards SGSNs (Ctrl) */ - "0004""7f000102" /* gtphub's address towards SGSNs (User) */ - ); - /* The response should go back to whichever port the request came from - * (unmapped by sequence nr) */ - LVL2_ASSERT(msg_from_ggsn_c(&resolved_ggsn_addr, - &sgsn_sender, - gtp_resp_from_ggsn, - gtp_resp_to_sgsn)); - - return 1; -} - -#define MSG_DEL_PDP_CTX_REQ(tei, seq) \ - "32" /* 0b001'1 0010: version 1, protocol GTP, with seq nr. */ \ - "14" /* type 20: Delete PDP Context Request */ \ - "0008" /* msg length = 8 + len (2 octets) */ \ - tei /* TEI Ctrl */ \ - seq /* Sequence nr (2 octets) */ \ - "00" /* N-PDU 0 */ \ - "00" /* No extensions */ \ - /* IEs */ \ - "13fe" /* 19: Teardown ind = 0 */ \ - "1400" /* 20: NSAPI = 0*/ \ - -#define MSG_DEL_PDP_CTX_RSP(tei, seq) \ - "32" /* 0b001'1 0010: version 1, protocol GTP, with seq nr. */ \ - "15" /* type 21: Delete PDP Context Response */ \ - "0006" /* msg length = 8 + len (2 octets) */ \ - tei /* TEI Ctrl */ \ - seq /* Sequence nr (2 octets) */ \ - "00" /* N-PDU 0 */ \ - "00" /* No extensions */ \ - /* IEs */ \ - "01" /* 1: Cause */ \ - "80" /* value = 0b10000000 = response, no rejection. */ \ - -static int delete_pdp_ctx_from_sgsn(void) -{ - now += GTPH_EXPIRE_QUICKLY_SECS + 1; - gtphub_gc(hub, now); - - LVL2_ASSERT(tunnels_are( - "TEI=1:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34 (TEI C=765 U=567)" - " @21945\n")); - - /* TEI Ctrl from above and next sequence after abcd. */ - const char *gtp_req_from_sgsn = MSG_DEL_PDP_CTX_REQ("00000001", "abce"); - const char *gtp_req_to_ggsn = MSG_DEL_PDP_CTX_REQ("00000765", "6d32"); - - LVL2_ASSERT(msg_from_sgsn_c(&sgsn_sender, - &resolved_ggsn_addr, - gtp_req_from_sgsn, - gtp_req_to_ggsn)); - - /* 21945 + 31 = 21976 */ - LVL2_ASSERT(tunnels_are( - "TEI=1:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34 (TEI C=765 U=567)" - " @21976\n")); - - const char *gtp_resp_from_ggsn = - MSG_DEL_PDP_CTX_RSP("00000001", "6d32"); - const char *gtp_resp_to_sgsn = - MSG_DEL_PDP_CTX_RSP("00000321", "abce"); - - /* The response should go back to whichever port the request came from - * (unmapped by sequence nr) */ - LVL2_ASSERT(msg_from_ggsn_c(&resolved_ggsn_addr, - &sgsn_sender, - gtp_resp_from_ggsn, - gtp_resp_to_sgsn)); - - LVL2_ASSERT(tunnels_are("")); - - return 1; -} - -static int delete_pdp_ctx_from_ggsn(void) -{ - now += GTPH_EXPIRE_QUICKLY_SECS + 1; - gtphub_gc(hub, now); - - LVL2_ASSERT(tunnels_are( - "TEI=1:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34 (TEI C=765 U=567)" - " @21945\n")); - - /* TEI Ctrl from above and next sequence after abcd. */ - const char *gtp_req_from_ggsn = MSG_DEL_PDP_CTX_REQ("00000001", "5432"); - const char *gtp_req_to_sgsn = MSG_DEL_PDP_CTX_REQ("00000321", "6d31"); - - LVL2_ASSERT(msg_from_ggsn_c(&ggsn_sender, - &resolved_sgsn_addr, - gtp_req_from_ggsn, - gtp_req_to_sgsn)); - - /* 21945 + 31 = 21976 */ - LVL2_ASSERT(tunnels_are( - "TEI=1:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34 (TEI C=765 U=567)" - " @21976\n")); - - const char *gtp_resp_from_sgsn = - MSG_DEL_PDP_CTX_RSP("00000001", "6d31"); - const char *gtp_resp_to_ggsn = - MSG_DEL_PDP_CTX_RSP("00000765", "5432"); - - /* The response should go back to whichever port the request came from - * (unmapped by sequence nr) */ - LVL2_ASSERT(msg_from_sgsn_c(&resolved_sgsn_addr, - &ggsn_sender, - gtp_resp_from_sgsn, - gtp_resp_to_ggsn)); - - LVL2_ASSERT(tunnels_are("")); - - return 1; -} - -static void test_one_pdp_ctx(int del_from_side) -{ - if (del_from_side == GTPH_SIDE_SGSN) - LOG("test_one_pdp_ctx (del from SGSN)") - else LOG("test_one_pdp_ctx (del from GGSN)"); - OSMO_ASSERT(setup_test_hub()); - - OSMO_ASSERT(create_pdp_ctx()); - - struct gtphub_peer_port *ggsn_port = - gtphub_port_find_sa(&hub->to_gsns[GTPH_SIDE_GGSN][GTPH_PLANE_CTRL], - &resolved_ggsn_addr); - OSMO_ASSERT(ggsn_port); - struct gtphub_peer *ggsn = ggsn_port->peer_addr->peer; - /* now == 345; now + 30 == 375. - * seq mapping from above: - * 0xabcd == 43981 (sent in the packet) - * 0x6d31 == 27953 (harcoded seq mapping start val) */ - OSMO_ASSERT(nr_map_is(&ggsn->seq_map, "(43981->27953@375), ")); - - /* now == 345; now + (6 * 60 * 60) == 21600 + 345 == 21945. - * 0x00000321 == 801 (TEI from SGSN Ctrl) - * 0x00000123 == 291 (TEI from SGSN User) - * 0x00000765 == 1893 (TEI from GGSN Ctrl) - * 0x00000567 == 1383 (TEI from GGSN User) - * Mapped TEIs should be 1 and 2. */ - OSMO_ASSERT(tunnels_are( - "TEI=1:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34 (TEI C=765 U=567)" - " @21945\n")); - - if (del_from_side == GTPH_SIDE_SGSN) { - OSMO_ASSERT(delete_pdp_ctx_from_sgsn()); - } else { - OSMO_ASSERT(delete_pdp_ctx_from_ggsn()); - } - OSMO_ASSERT(tunnels_are("")); - - OSMO_ASSERT(clear_test_hub()); -} - -static void test_user_data(void) -{ - LOG("test_user_data"); - - OSMO_ASSERT(setup_test_hub()); - - OSMO_ASSERT(create_pdp_ctx()); - - /* now == 345; now + (6 * 60 * 60) == 21600 + 345 == 21945. */ - OSMO_ASSERT(tunnels_are( - "TEI=1:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34 (TEI C=765 U=567)" - " @21945\n")); - - LOG("- user data starts"); - /* Now expect default port numbers for User plane. */ - resolve_to_ggsn("192.168.43.34", 2152); - resolve_to_sgsn("192.168.42.23", 2152); - - /* 10 minutes later */ - now += 600; - - const char *u_from_ggsn = - "32" /* 0b001'1 0010: version 1, protocol GTP, with seq nr */ - "ff" /* type 255: G-PDU */ - "0058" /* length: 88 + 8 octets == 96 */ - "00000001" /* mapped TEI for SGSN from create_pdp_ctx() */ - "0070" /* seq */ - "0000" /* No extensions */ - /* User data (ICMP packet), 96 - 12 = 84 octets */ - "45000054daee40004001f7890a172a010a172a02080060d23f590071e3f8" - "4156000000007241010000000000101112131415161718191a1b1c1d1e1f" - "202122232425262728292a2b2c2d2e2f3031323334353637" - ; - const char *u_to_sgsn = - "32" /* 0b001'1 0010: version 1, protocol GTP, with seq nr */ - "ff" /* type 255: G-PDU */ - "0058" /* length: 88 + 8 octets == 96 */ - "00000123" /* unmapped User TEI */ - "6d31" /* new mapped seq */ - "0000" - "45000054daee40004001f7890a172a010a172a02080060d23f590071e3f8" - "4156000000007241010000000000101112131415161718191a1b1c1d1e1f" - "202122232425262728292a2b2c2d2e2f3031323334353637" - ; - - /* This depends on create_pdp_ctx() sending resolved_sgsn_addr as GSN - * Address IEs in the GGSN's Create PDP Ctx Response. */ - OSMO_ASSERT(msg_from_ggsn_u(&ggsn_sender, - &resolved_sgsn_addr, - u_from_ggsn, - u_to_sgsn)); - - /* Make sure the user plane messages have refreshed the TEI mapping - * timeouts: 21945 + 600 == 22545. */ - OSMO_ASSERT(tunnels_are( - "TEI=1:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34 (TEI C=765 U=567)" - " @22545\n")); - - const char *u_from_sgsn = - "32" /* 0b001'1 0010: version 1, protocol GTP, with seq nr */ - "ff" /* type 255: G-PDU */ - "0058" /* length: 88 + 8 octets == 96 */ - "00000001" /* mapped User TEI for GGSN from create_pdp_ctx() */ - "1234" /* unknown seq */ - "0000" /* No extensions */ - /* User data (ICMP packet), 96 - 12 = 84 octets */ - "45000054daee40004001f7890a172a010a172a02080060d23f590071e3f8" - "4156000000007241010000000000101112131415161718191a1b1c1d1e1f" - "202122232425262728292a2b2c2d2e2f3031323334353637" - ; - const char *u_to_ggsn = - "32" /* 0b001'1 0010: version 1, protocol GTP, with seq nr */ - "ff" /* type 255: G-PDU */ - "0058" /* length: 88 + 8 octets == 96 */ - "00000567" /* unmapped User TEI */ - "6d31" /* unmapped seq */ - "0000" - "45000054daee40004001f7890a172a010a172a02080060d23f590071e3f8" - "4156000000007241010000000000101112131415161718191a1b1c1d1e1f" - "202122232425262728292a2b2c2d2e2f3031323334353637" - ; - - OSMO_ASSERT(msg_from_sgsn_u(&sgsn_sender, - &resolved_ggsn_addr, - u_from_sgsn, - u_to_ggsn)); - - /* Make sure the user plane messages have refreshed the TEI mapping - * timeouts: 21945 + 600 == 22545. Both timeouts refreshed: */ - OSMO_ASSERT(tunnels_are( - "TEI=1:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34 (TEI C=765 U=567)" - " @22545\n")); - - OSMO_ASSERT(clear_test_hub()); -} - -static void test_reused_tei(void) -{ - LOG("test_reused_tei"); - - OSMO_ASSERT(setup_test_hub()); - - OSMO_ASSERT(create_pdp_ctx()); - - const char *gtp_req_from_sgsn = - MSG_PDP_CTX_REQ("0068", - "abce", /* Next seq */ - "60", - "42000121436587f9", - "00000123", /* Same TEIs as before */ - "00000321", - "0009""08696e7465726e6574", /* "(8)internet" */ - "0004""c0a82a17", /* same as default sgsn_sender */ - "0004""c0a82a17" - ); - const char *gtp_req_to_ggsn = - MSG_PDP_CTX_REQ("0068", - "6d32", /* mapped seq ("abce") */ - "23", - "42000121436587f9", - "00000002", /* mapped TEI Data I ("123") */ - "00000002", /* mapped TEI Control ("321") */ - "0009""08696e7465726e6574", - "0004""7f000201", /* replaced with gtphub's ggsn ctrl */ - "0004""7f000202" /* replaced with gtphub's ggsn user */ - ); - - OSMO_ASSERT(msg_from_sgsn_c(&sgsn_sender, - &resolved_ggsn_addr, - gtp_req_from_sgsn, - gtp_req_to_ggsn)); - OSMO_ASSERT(was_resolved_for("240010123456789", "internet")); - - OSMO_ASSERT(tunnels_are( - "TEI=2:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34/(uninitialized) (TEI C=0 U=0)" - " @21945\n")); - - const char *gtp_resp_from_ggsn = - MSG_PDP_CTX_RSP("004e", - "00000002", /* destination TEI (sent in req above) */ - "6d32", /* mapped seq */ - "01", /* restart */ - "00000567", /* TEI U */ - "00000765", /* TEI C */ - "0004""c0a82b22", /* GSN addresses */ - "0004""c0a82b22" /* (== resolved_ggsn_addr) */ - ); - const char *gtp_resp_to_sgsn = - MSG_PDP_CTX_RSP("004e", - "00000321", /* unmapped TEI ("001") */ - "abce", /* unmapped seq ("6d32") */ - "23", - "00000002", /* mapped TEI from GGSN ("567") */ - "00000002", /* mapped TEI from GGSN ("765") */ - "0004""7f000101", /* gtphub's address towards SGSNs (Ctrl) */ - "0004""7f000102" /* gtphub's address towards SGSNs (User) */ - ); - /* The response should go back to whichever port the request came from - * (unmapped by sequence nr) */ - OSMO_ASSERT(msg_from_ggsn_c(&resolved_ggsn_addr, - &sgsn_sender, - gtp_resp_from_ggsn, - gtp_resp_to_sgsn)); - - OSMO_ASSERT(clear_test_hub()); -} - -static void test_peer_restarted(void) -{ - LOG("test_peer_restarted"); - - OSMO_ASSERT(setup_test_hub()); - - OSMO_ASSERT(create_pdp_ctx()); - - now += 10; - - const char *gtp_req_from_sgsn = - MSG_PDP_CTX_REQ("0068", - "1234", /* brand new seq */ - "61", /* DIFFERING restart counter */ - "42000121436587f9", - "00000abc", - "00000cba", - "0009""08696e7465726e6574", /* "(8)internet" */ - "0004""c0a82a17", /* same as default sgsn_sender */ - "0004""c0a82a17" - ); - const char *gtp_req_to_ggsn = - MSG_PDP_CTX_REQ("0068", - "6d33", /* mapped seq ("1234") */ - "23", - "42000121436587f9", - "00000002", /* mapped TEI Data I ("123") */ - "00000002", /* mapped TEI Control ("321") */ - "0009""08696e7465726e6574", - "0004""7f000201", /* replaced with gtphub's ggsn ctrl */ - "0004""7f000202" /* replaced with gtphub's ggsn user */ - ); - - OSMO_ASSERT(msg_from_sgsn_c(&sgsn_sender, - &resolved_ggsn_addr, - gtp_req_from_sgsn, - gtp_req_to_ggsn)); - OSMO_ASSERT(was_resolved_for("240010123456789", "internet")); - - OSMO_ASSERT(tunnels_are( - "TEI=2:" - " 192.168.42.23 (TEI C=cba U=abc)" - " <-> 192.168.43.34/(uninitialized) (TEI C=0 U=0)" - " @21955\n" - "TEI=1:" - " (uninitialized) (TEI C=321 U=123)" - " <-> 192.168.43.34 (TEI C=765 U=567)" - " @21945\n" - )); - - const char *gtp_resp_from_ggsn = - MSG_PDP_CTX_RSP("004e", - "00000002", /* destination TEI (sent in req above) */ - "6d33", /* mapped seq */ - "01", /* restart */ - "00000def", /* TEI U */ - "00000fde", /* TEI C */ - "0004""c0a82b22", /* GSN addresses */ - "0004""c0a82b22" /* (== resolved_ggsn_addr) */ - ); - const char *gtp_resp_to_sgsn = - MSG_PDP_CTX_RSP("004e", - "00000cba", /* unmapped TEI ("005") */ - "1234", /* unmapped seq ("6d32") */ - "23", - "00000002", /* mapped TEI from GGSN ("567") */ - "00000002", /* mapped TEI from GGSN ("765") */ - "0004""7f000101", /* gtphub's address towards SGSNs (Ctrl) */ - "0004""7f000102" /* gtphub's address towards SGSNs (User) */ - ); - /* The response should go back to whichever port the request came from - * (unmapped by sequence nr) */ - OSMO_ASSERT(msg_from_ggsn_c(&resolved_ggsn_addr, - &sgsn_sender, - gtp_resp_from_ggsn, - gtp_resp_to_sgsn)); - - OSMO_ASSERT(clear_test_hub()); -} - -static void test_peer_restarted_reusing_tei(void) -{ - LOG("test_peer_restarted_reusing_tei"); - - OSMO_ASSERT(setup_test_hub()); - - OSMO_ASSERT(create_pdp_ctx()); - - now += 10; - - const char *gtp_req_from_sgsn = - MSG_PDP_CTX_REQ("0068", - "1234", /* brand new seq */ - "61", /* DIFFERING restart counter */ - "42000121436587f9", - "00000123", /* SAME TEI */ - "00000321", - "0009""08696e7465726e6574", /* "(8)internet" */ - "0004""c0a82a17", /* same as default sgsn_sender */ - "0004""c0a82a17" - ); - const char *gtp_req_to_ggsn = - MSG_PDP_CTX_REQ("0068", - "6d33", /* seq 6d31 + 2, after "out-of-band" Delete PDP Ctx - due to differing restart counter. */ - "23", - "42000121436587f9", - "00000002", /* mapped TEI Data I ("123") */ - "00000002", /* mapped TEI Control ("321") */ - "0009""08696e7465726e6574", - "0004""7f000201", /* replaced with gtphub's ggsn ctrl */ - "0004""7f000202" /* replaced with gtphub's ggsn user */ - ); - - OSMO_ASSERT(msg_from_sgsn_c(&sgsn_sender, - &resolved_ggsn_addr, - gtp_req_from_sgsn, - gtp_req_to_ggsn)); - OSMO_ASSERT(was_resolved_for("240010123456789", "internet")); - - OSMO_ASSERT(tunnels_are( - "TEI=2:" /* being established after restart */ - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34/(uninitialized) (TEI C=0 U=0)" - " @21955\n" - "TEI=1:" /* invalidated due to restart */ - " (uninitialized) (TEI C=321 U=123)" - " <-> 192.168.43.34 (TEI C=765 U=567)" - " @21945\n" - )); - - /* An "out-of-band" delete request should have been sent to the GGSN - * (checked by expected log output in gtphub_test.ok), and the GGSN - * will (usually) send a Delete Response like this: */ - const char *gtp_del_resp_from_ggsn = - MSG_DEL_PDP_CTX_RSP("00000001", "6d32"); - - /* For this response (due to peer restart) we expect no forwarded - * message. */ - OSMO_ASSERT(msg_from_ggsn_c(&resolved_ggsn_addr, - &sgsn_sender, - gtp_del_resp_from_ggsn, - "")); - - OSMO_ASSERT(tunnels_are( - "TEI=2:" /* still being established after restart */ - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34/(uninitialized) (TEI C=0 U=0)" - " @21955\n" - )); - - const char *gtp_resp_from_ggsn = - MSG_PDP_CTX_RSP("004e", - "00000002", /* destination TEI (sent in req above) */ - "6d33", /* mapped seq */ - "01", /* restart */ - "00000def", /* TEI U */ - "00000fde", /* TEI C */ - "0004""c0a82b22", /* GSN addresses */ - "0004""c0a82b22" /* (== resolved_ggsn_addr) */ - ); - const char *gtp_resp_to_sgsn = - MSG_PDP_CTX_RSP("004e", - "00000321", /* unmapped TEI ("005") */ - "1234", /* unmapped seq ("6d33") */ - "23", - "00000002", /* mapped TEI from GGSN ("567") */ - "00000002", /* mapped TEI from GGSN ("765") */ - "0004""7f000101", /* gtphub's address towards SGSNs (Ctrl) */ - "0004""7f000102" /* gtphub's address towards SGSNs (User) */ - ); - /* The response should go back to whichever port the request came from - * (unmapped by sequence nr) */ - OSMO_ASSERT(msg_from_ggsn_c(&resolved_ggsn_addr, - &sgsn_sender, - gtp_resp_from_ggsn, - gtp_resp_to_sgsn)); - - OSMO_ASSERT(tunnels_are( - "TEI=2:" /* still being established after restart */ - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34 (TEI C=fde U=def)" - " @21955\n" - )); - - OSMO_ASSERT(clear_test_hub()); -} - -static void test_sgsn_behind_nat(void) -{ - LOG("test_user_data"); - - OSMO_ASSERT(setup_test_hub()); - hub->sgsn_use_sender = 1; /* <-- Main difference to test_user_data() */ - resolve_to_sgsn("192.168.42.23", 423); /* Same as sender */ - - OSMO_ASSERT(create_pdp_ctx()); - - /* now == 345; now + (6 * 60 * 60) == 21600 + 345 == 21945. */ - OSMO_ASSERT(tunnels_are( - "TEI=1:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34 (TEI C=765 U=567)" - " @21945\n")); - - LOG("- user data starts"); - /* Now expect default port numbers for User plane -- except SGSN. */ - resolve_to_ggsn("192.168.43.34", 2152); - - /* 10 minutes later */ - now += 600; - - const char *u_from_ggsn = - "32" /* 0b001'1 0010: version 1, protocol GTP, with seq nr */ - "ff" /* type 255: G-PDU */ - "0058" /* length: 88 + 8 octets == 96 */ - "00000001" /* mapped User TEI for SGSN from create_pdp_ctx() */ - "0070" /* seq */ - "0000" /* No extensions */ - /* User data (ICMP packet), 96 - 12 = 84 octets */ - "45000054daee40004001f7890a172a010a172a02080060d23f590071e3f8" - "4156000000007241010000000000101112131415161718191a1b1c1d1e1f" - "202122232425262728292a2b2c2d2e2f3031323334353637" - ; - const char *u_to_sgsn = - "32" /* 0b001'1 0010: version 1, protocol GTP, with seq nr */ - "ff" /* type 255: G-PDU */ - "0058" /* length: 88 + 8 octets == 96 */ - "00000123" /* unmapped User TEI */ - "6d31" /* new mapped seq */ - "0000" - "45000054daee40004001f7890a172a010a172a02080060d23f590071e3f8" - "4156000000007241010000000000101112131415161718191a1b1c1d1e1f" - "202122232425262728292a2b2c2d2e2f3031323334353637" - ; - - /* This depends on create_pdp_ctx() sending resolved_sgsn_addr as GSN - * Address IEs in the GGSN's Create PDP Ctx Response. */ - OSMO_ASSERT(msg_from_ggsn_u(&ggsn_sender, - &resolved_sgsn_addr, - u_from_ggsn, - u_to_sgsn)); - - /* Make sure the user plane messages have refreshed the TEI mapping - * timeouts: 21945 + 600 == 22545. */ - OSMO_ASSERT(tunnels_are( - "TEI=1:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34 (TEI C=765 U=567)" - " @22545\n")); - - const char *u_from_sgsn = - "32" /* 0b001'1 0010: version 1, protocol GTP, with seq nr */ - "ff" /* type 255: G-PDU */ - "0058" /* length: 88 + 8 octets == 96 */ - "00000001" /* mapped User TEI for GGSN from create_pdp_ctx() */ - "1234" /* unknown seq */ - "0000" /* No extensions */ - /* User data (ICMP packet), 96 - 12 = 84 octets */ - "45000054daee40004001f7890a172a010a172a02080060d23f590071e3f8" - "4156000000007241010000000000101112131415161718191a1b1c1d1e1f" - "202122232425262728292a2b2c2d2e2f3031323334353637" - ; - const char *u_to_ggsn = - "32" /* 0b001'1 0010: version 1, protocol GTP, with seq nr */ - "ff" /* type 255: G-PDU */ - "0058" /* length: 88 + 8 octets == 96 */ - "00000567" /* unmapped User TEI */ - "6d31" /* unmapped seq */ - "0000" - "45000054daee40004001f7890a172a010a172a02080060d23f590071e3f8" - "4156000000007241010000000000101112131415161718191a1b1c1d1e1f" - "202122232425262728292a2b2c2d2e2f3031323334353637" - ; - - OSMO_ASSERT(msg_from_sgsn_u(&sgsn_sender, - &resolved_ggsn_addr, - u_from_sgsn, - u_to_ggsn)); - - /* Make sure the user plane messages have refreshed the TEI mapping - * timeouts: 21945 + 600 == 22545. Both timeouts refreshed: */ - OSMO_ASSERT(tunnels_are( - "TEI=1:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34 (TEI C=765 U=567)" - " @22545\n")); - - OSMO_ASSERT(clear_test_hub()); -} - -void test_parallel_context_creation(void) -{ - LOG("test_parallel_context_creation"); - - OSMO_ASSERT(setup_test_hub()); - - const char *gtp_req_from_sgsn1 = - MSG_PDP_CTX_REQ("0068", - "abcd", - "60", - "42000121436587f9", - "00000123", - "00000321", - "0009""08696e7465726e6574", /* "(8)internet" */ - "0004""c0a82a17", /* same as default sgsn_sender */ - "0004""c0a82a17" - ); - const char *gtp_req_to_ggsn1 = - MSG_PDP_CTX_REQ("0068", - "6d31", /* mapped seq ("abcd") */ - "23", - "42000121436587f9", - "00000001", /* mapped TEI Data I ("123") */ - "00000001", /* mapped TEI Control ("321") */ - "0009""08696e7465726e6574", - "0004""7f000201", /* replaced with gtphub's ggsn ctrl */ - "0004""7f000202" /* replaced with gtphub's ggsn user */ - ); - - OSMO_ASSERT(msg_from_sgsn_c(&sgsn_sender, - &resolved_ggsn_addr, - gtp_req_from_sgsn1, - gtp_req_to_ggsn1)); - - OSMO_ASSERT(tunnels_are( - "TEI=1:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34/(uninitialized) (TEI C=0 U=0)" - " @21945\n")); - - now ++; - - const char *gtp_req_from_sgsn2 = - MSG_PDP_CTX_REQ("0068", - "abce", - "60", - "42000121436588f9", - "00000124", - "00000322", - "0009""08696e7465726e6574", /* "(8)internet" */ - "0004""c0a82a17", /* same as default sgsn_sender */ - "0004""c0a82a17" - ); - const char *gtp_req_to_ggsn2 = - MSG_PDP_CTX_REQ("0068", - "6d32", /* mapped seq ("abce") */ - "23", - "42000121436588f9", - "00000002", /* mapped TEI Data I ("124") */ - "00000002", /* mapped TEI Control ("322") */ - "0009""08696e7465726e6574", - "0004""7f000201", /* replaced with gtphub's ggsn ctrl */ - "0004""7f000202" /* replaced with gtphub's ggsn user */ - ); - - OSMO_ASSERT(msg_from_sgsn_c(&sgsn_sender, - &resolved_ggsn_addr, - gtp_req_from_sgsn2, - gtp_req_to_ggsn2)); - - OSMO_ASSERT(tunnels_are( - "TEI=2:" - " 192.168.42.23 (TEI C=322 U=124)" - " <-> 192.168.43.34/(uninitialized) (TEI C=0 U=0)" - " @21946\n" - "TEI=1:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34/(uninitialized) (TEI C=0 U=0)" - " @21945\n" - )); - - now ++; - - const char *gtp_resp_from_ggsn1 = - MSG_PDP_CTX_RSP("004e", - "00000001", /* destination TEI (sent in req above) */ - "6d31", /* mapped seq */ - "01", /* restart */ - "00000567", /* TEI U */ - "00000765", /* TEI C */ - "0004""c0a82b22", /* GSN addresses */ - "0004""c0a82b22" /* (== resolved_ggsn_addr) */ - ); - const char *gtp_resp_to_sgsn1 = - MSG_PDP_CTX_RSP("004e", - "00000321", /* unmapped TEI ("001") */ - "abcd", /* unmapped seq ("6d31") */ - "23", - "00000001", /* mapped TEI from GGSN ("567") */ - "00000001", /* mapped TEI from GGSN ("765") */ - "0004""7f000101", /* gtphub's address towards SGSNs (Ctrl) */ - "0004""7f000102" /* gtphub's address towards SGSNs (User) */ - ); - - OSMO_ASSERT(msg_from_ggsn_c(&resolved_ggsn_addr, - &sgsn_sender, - gtp_resp_from_ggsn1, - gtp_resp_to_sgsn1)); - - OSMO_ASSERT(tunnels_are( - "TEI=2:" - " 192.168.42.23 (TEI C=322 U=124)" - " <-> 192.168.43.34/(uninitialized) (TEI C=0 U=0)" - " @21946\n" - "TEI=1:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34 (TEI C=765 U=567)" - " @21947\n" - )); - - now ++; - - const char *gtp_resp_from_ggsn2 = - MSG_PDP_CTX_RSP("004e", - "00000002", /* destination TEI (sent in req above) */ - "6d32", /* mapped seq */ - "01", /* restart */ - "00000568", /* TEI U */ - "00000766", /* TEI C */ - "0004""c0a82b22", /* GSN addresses */ - "0004""c0a82b22" /* (== resolved_ggsn_addr) */ - ); - const char *gtp_resp_to_sgsn2 = - MSG_PDP_CTX_RSP("004e", - "00000322", /* unmapped TEI ("001") */ - "abce", /* unmapped seq ("6d31") */ - "23", - "00000002", /* mapped TEI from GGSN ("567") */ - "00000002", /* mapped TEI from GGSN ("765") */ - "0004""7f000101", /* gtphub's address towards SGSNs (Ctrl) */ - "0004""7f000102" /* gtphub's address towards SGSNs (User) */ - ); - - OSMO_ASSERT(msg_from_ggsn_c(&resolved_ggsn_addr, - &sgsn_sender, - gtp_resp_from_ggsn2, - gtp_resp_to_sgsn2)); - - OSMO_ASSERT(tunnels_are( - "TEI=2:" - " 192.168.42.23 (TEI C=322 U=124)" - " <-> 192.168.43.34 (TEI C=766 U=568)" - " @21948\n" - "TEI=1:" - " 192.168.42.23 (TEI C=321 U=123)" - " <-> 192.168.43.34 (TEI C=765 U=567)" - " @21947\n" - )); - - OSMO_ASSERT(clear_test_hub()); -} - - -static struct log_info_cat gtphub_categories[] = { - [DGTPHUB] = { - .name = "DGTPHUB", - .description = "GTP Hub", - .color = "\033[1;33m", - .enabled = 1, .loglevel = LOGL_DEBUG, - }, -}; - -static struct log_info info = { - .cat = gtphub_categories, - .num_cat = ARRAY_SIZE(gtphub_categories), -}; - -int main(int argc, char **argv) -{ - osmo_gtphub_ctx = talloc_named_const(NULL, 0, "osmo_gtphub"); - void *log_ctx = talloc_named_const(osmo_gtphub_ctx, 0, "log"); - osmo_init_logging2(log_ctx, &info); - - test_nr_map_basic(); - test_nr_map_wrap(); - test_expiry(); - test_echo(); - test_one_pdp_ctx(GTPH_SIDE_SGSN); - test_one_pdp_ctx(GTPH_SIDE_GGSN); - test_user_data(); - test_reused_tei(); - test_peer_restarted(); - test_peer_restarted_reusing_tei(); - test_sgsn_behind_nat(); - test_parallel_context_creation(); - printf("Done\n"); - - talloc_report_full(osmo_gtphub_ctx, stderr); - talloc_free(log_ctx); - OSMO_ASSERT(talloc_total_blocks(osmo_gtphub_ctx) == 1); - talloc_free(osmo_gtphub_ctx); - return 0; -} - diff --git a/tests/gtphub/gtphub_test.ok b/tests/gtphub/gtphub_test.ok deleted file mode 100644 index e60d5f2b..00000000 --- a/tests/gtphub/gtphub_test.ok +++ /dev/null @@ -1,42 +0,0 @@ -test_echo -test_one_pdp_ctx (del from SGSN) -- __wrap_gtphub_resolve_ggsn_addr(): - returning GGSN addr from imsi 240010123456789 ni internet: 192.168.43.34 port 2123 -test_one_pdp_ctx (del from GGSN) -- __wrap_gtphub_resolve_ggsn_addr(): - returning GGSN addr from imsi 240010123456789 ni internet: 192.168.43.34 port 2123 -test_user_data -- __wrap_gtphub_resolve_ggsn_addr(): - returning GGSN addr from imsi 240010123456789 ni internet: 192.168.43.34 port 2123 -- user data starts -test_reused_tei -- __wrap_gtphub_resolve_ggsn_addr(): - returning GGSN addr from imsi 240010123456789 ni internet: 192.168.43.34 port 2123 -- __wrap_gtphub_resolve_ggsn_addr(): - returning GGSN addr from imsi 240010123456789 ni internet: 192.168.43.34 port 2123 -test_peer_restarted -- __wrap_gtphub_resolve_ggsn_addr(): - returning GGSN addr from imsi 240010123456789 ni internet: 192.168.43.34 port 2123 -Out-of-band gtphub_write(16): -to 192.168.43.34 port 2123 -32 14 00 08 00 00 07 65 6d 32 00 00 13 ff 14 00 -- __wrap_gtphub_resolve_ggsn_addr(): - returning GGSN addr from imsi 240010123456789 ni internet: 192.168.43.34 port 2123 -test_peer_restarted_reusing_tei -- __wrap_gtphub_resolve_ggsn_addr(): - returning GGSN addr from imsi 240010123456789 ni internet: 192.168.43.34 port 2123 -Out-of-band gtphub_write(16): -to 192.168.43.34 port 2123 -32 14 00 08 00 00 07 65 6d 32 00 00 13 ff 14 00 -- __wrap_gtphub_resolve_ggsn_addr(): - returning GGSN addr from imsi 240010123456789 ni internet: 192.168.43.34 port 2123 -test_user_data -- __wrap_gtphub_resolve_ggsn_addr(): - returning GGSN addr from imsi 240010123456789 ni internet: 192.168.43.34 port 2123 -- user data starts -test_parallel_context_creation -- __wrap_gtphub_resolve_ggsn_addr(): - returning GGSN addr from imsi 240010123456789 ni internet: 192.168.43.34 port 2123 -- __wrap_gtphub_resolve_ggsn_addr(): - returning GGSN addr from imsi 240010123456889 ni internet: 192.168.43.34 port 2123 -Done diff --git a/tests/osmo-sgsn_test-nodes.vty b/tests/osmo-sgsn_test-nodes.vty deleted file mode 100644 index 109e2ece..00000000 --- a/tests/osmo-sgsn_test-nodes.vty +++ /dev/null @@ -1,64 +0,0 @@ -OsmoSGSN> enable -OsmoSGSN# show timer -T3312 = 600 s Periodic RA Update timer (s) (default: 600 s) -T3313 = 30 s Waiting for paging response timer (s) (default: 30 s) -T3314 = 44 s READY timer. Force to STANDBY on expiry timer (s) (default: 44 s) -T3316 = 44 s AA-Ready timer (s) (default: 44 s) -T3322 = 6 s Detach request -> accept timer (s) (default: 6 s) -T3350 = 6 s Waiting for ATT/RAU/TMSI_COMPL timer (s) (default: 6 s) -T3360 = 6 s Waiting for AUTH/CIPH response timer (s) (default: 6 s) -T3370 = 6 s Waiting for IDENTITY response timer (s) (default: 6 s) -T3385 = 8 s Wait for ACT PDP CTX REQ timer (s) (default: 8 s) -T3386 = 8 s Wait for MODIFY PDP CTX ACK timer (s) (default: 8 s) -T3395 = 8 s Wait for DEACT PDP CTX ACK timer (s) (default: 8 s) -T3397 = 8 s Wait for DEACT AA PDP CTX ACK timer (s) (default: 8 s) -X1001 = 5 s RANAP Release timeout. Wait for RANAP Release Complete.On expiry release Iu connection (s) (default: 5 s) -X3314 = 44 s Iu User inactivity timer. On expiry release Iu connection (s) (default: 44 s) -OsmoSGSN# configure terminal -OsmoSGSN(config)# list -... - sgsn - ctrl -... - ns - bssgp -... - -OsmoSGSN(config)# sgsn -OsmoSGSN(config-sgsn)# list -... - gtp state-dir PATH - gtp local-ip A.B.C.D - ggsn <0-255> remote-ip A.B.C.D - ggsn <0-255> gtp-version (0|1) - ggsn <0-255> echo-interval <1-36000> - ggsn <0-255> no echo-interval - imsi-acl (add|del) IMSI - auth-policy (accept-all|closed|acl-only|remote) - authentication (optional|required) - encryption (GEA0|GEA1|GEA2|GEA3|GEA4) - gsup ipa-name NAME - gsup remote-ip A.B.C.D - gsup remote-port <0-65535> - gsup oap-id <0-65535> - gsup oap-k K - gsup oap-opc OPC - apn APNAME ggsn <0-255> - apn APNAME imsi-prefix IMSIPRE ggsn <0-255> - access-point-name NAME - no access-point-name NAME - cdr filename NAME - no cdr filename - cdr trap - no cdr trap - cdr interval <1-2147483647> - ggsn dynamic - grx-dns-add A.B.C.D - timer [TNNNN] [(<0-2147483647>|default)] - no compression rfc1144 - compression rfc1144 active slots <1-256> - compression rfc1144 passive - no compression v42bis - compression v42bis active direction (ms|sgsn|both) codewords <512-65535> strlen <6-250> - compression v42bis passive -... diff --git a/tests/sgsn/Makefile.am b/tests/sgsn/Makefile.am deleted file mode 100644 index b72c4463..00000000 --- a/tests/sgsn/Makefile.am +++ /dev/null @@ -1,89 +0,0 @@ -AM_CPPFLAGS = \ - $(all_includes) \ - -I$(top_srcdir)/include \ - $(NULL) - -AM_CFLAGS = \ - -Wall \ - -ggdb3 \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOGSUPCLIENT_CFLAGS) \ - $(LIBCARES_CFLAGS) \ - $(LIBGTP_CFLAGS) \ - $(NULL) -if BUILD_IU -AM_CFLAGS += \ - $(LIBASN1C_CFLAGS) \ - $(LIBOSMOSIGTRAN_CFLAGS) \ - $(LIBOSMORANAP_CFLAGS) \ - $(NULL) -endif - -EXTRA_DIST = \ - sgsn_test.ok \ - $(NULL) - -noinst_PROGRAMS = \ - sgsn_test \ - $(NULL) - -sgsn_test_SOURCES = \ - sgsn_test.c \ - $(NULL) - -sgsn_test_LDFLAGS = \ - -Wl,--wrap=osmo_get_rand_id \ - -Wl,--wrap=sgsn_update_subscriber_data \ - -Wl,--wrap=gprs_subscr_request_update_location \ - -Wl,--wrap=gprs_subscr_request_auth_info \ - -Wl,--wrap=osmo_gsup_client_send \ - $(NULL) - -sgsn_test_LDADD = \ - $(top_builddir)/src/sgsn/gprs_llc.o \ - $(top_builddir)/src/sgsn/gprs_gb.o \ - $(top_builddir)/src/sgsn/gprs_sndcp.o \ - $(top_builddir)/src/sgsn/gprs_gmm_attach.o \ - $(top_builddir)/src/sgsn/gprs_gmm.o \ - $(top_builddir)/src/sgsn/gprs_gmm_fsm.o \ - $(top_builddir)/src/sgsn/gprs_mm_state_gb_fsm.o \ - $(top_builddir)/src/sgsn/gprs_sgsn.o \ - $(top_builddir)/src/sgsn/sgsn_vty.o \ - $(top_builddir)/src/sgsn/sgsn_libgtp.o \ - $(top_builddir)/src/sgsn/sgsn_auth.o \ - $(top_builddir)/src/sgsn/gprs_subscriber.o \ - $(top_builddir)/src/sgsn/gprs_llc_xid.o \ - $(top_builddir)/src/sgsn/gprs_sndcp_xid.o \ - $(top_builddir)/src/sgsn/slhc.o \ - $(top_builddir)/src/sgsn/gprs_sm.o \ - $(top_builddir)/src/sgsn/gprs_sndcp_comp.o \ - $(top_builddir)/src/sgsn/gprs_sndcp_pcomp.o \ - $(top_builddir)/src/sgsn/v42bis.o \ - $(top_builddir)/src/sgsn/gprs_sndcp_dcomp.o \ - $(top_builddir)/src/gprs/gprs_utils.o \ - $(top_builddir)/src/gprs/gprs_llc_parse.o \ - $(top_builddir)/src/gprs/gprs_gb_parse.o \ - $(top_builddir)/src/gprs/crc24.o \ - $(top_builddir)/src/gprs/sgsn_ares.o \ - $(LIBOSMOABIS_LIBS) \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBOSMOGB_LIBS) \ - $(LIBOSMOGSUPCLIENT_LIBS) \ - $(LIBCARES_LIBS) \ - $(LIBGTP_LIBS) \ - -lrt \ - -lm \ - $(NULL) - -if BUILD_IU -sgsn_test_LDADD += \ - $(top_builddir)/src/sgsn/gprs_ranap.o \ - $(top_builddir)/src/sgsn/gprs_mm_state_iu_fsm.o \ - $(LIBOSMORANAP_LIBS) \ - $(LIBOSMOSIGTRAN_LIBS) \ - $(LIBASN1C_LIBS) \ - $(NULL) -endif diff --git a/tests/sgsn/sgsn_test.c b/tests/sgsn/sgsn_test.c deleted file mode 100644 index 05746206..00000000 --- a/tests/sgsn/sgsn_test.c +++ /dev/null @@ -1,1693 +0,0 @@ -/* Test the SGSN */ -/* - * (C) 2014 by Holger Hans Peter Freyther - * (C) 2014 by sysmocom s.f.m.c. GmbH - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include - -#include - -void *tall_sgsn_ctx; -static struct sgsn_instance sgsn_inst = { - .config_file = "osmo_sgsn.cfg", - .cfg = { - .gtp_statedir = "./", - .auth_policy = SGSN_AUTH_POLICY_CLOSED, - }, -}; -struct sgsn_instance *sgsn = &sgsn_inst; -unsigned sgsn_tx_counter = 0; -struct msgb *last_msg = NULL; -struct gprs_gb_parse_context last_dl_parse_ctx; - -static void reset_last_msg() -{ - if (last_msg) - msgb_free(last_msg); - - last_msg = NULL; - memset(&last_dl_parse_ctx, 0, sizeof(last_dl_parse_ctx)); -} - -static void cleanup_test() -{ - reset_last_msg(); -} - -static uint32_t get_new_ptmsi(const struct gprs_gb_parse_context *parse_ctx) -{ - uint32_t new_ptmsi = GSM_RESERVED_TMSI; - - if (parse_ctx->new_ptmsi_enc) - gprs_parse_tmsi(parse_ctx->new_ptmsi_enc, &new_ptmsi); - - return new_ptmsi; -} - -/* override */ -int bssgp_tx_dl_ud(struct msgb *msg, uint16_t pdu_lifetime, - struct bssgp_dl_ud_par *dup) -{ - int rc; - - reset_last_msg(); - - last_msg = msg; - OSMO_ASSERT(msgb_data(last_msg) != NULL); - - rc = gprs_gb_parse_llc(msgb_data(last_msg), msgb_length(last_msg), - &last_dl_parse_ctx); - - fprintf(stderr, "Got DL LLC message: %s\n", - gprs_gb_message_name(&last_dl_parse_ctx, "UNKNOWN")); - - OSMO_ASSERT(rc > 0); - - sgsn_tx_counter += 1; - return 0; -} - -/* override, requires '-Wl,--wrap=osmo_get_rand_id' */ -int __real_osmo_get_rand_id(uint8_t *data, size_t len); -int mock_osmo_get_rand_id(uint8_t *data, size_t len); -int (*osmo_get_rand_id_cb)(uint8_t *, size_t) = - &mock_osmo_get_rand_id; - -int __wrap_osmo_get_rand_id(uint8_t *buf, size_t num) -{ - return (*osmo_get_rand_id_cb)(buf, num); -} -/* make results of A&C ref predictable */ -int mock_osmo_get_rand_id(uint8_t *buf, size_t num) -{ - if (num > 1) - return __real_osmo_get_rand_id(buf, num); - buf[0] = 0; - return 1; -} - -/* override, requires '-Wl,--wrap=sgsn_update_subscriber_data' */ -void __real_sgsn_update_subscriber_data(struct sgsn_mm_ctx *); -void (*update_subscriber_data_cb)(struct sgsn_mm_ctx *) = - &__real_sgsn_update_subscriber_data; - -void __wrap_sgsn_update_subscriber_data(struct sgsn_mm_ctx *mmctx) -{ - (*update_subscriber_data_cb)(mmctx); -} - -/* override, requires '-Wl,--wrap=gprs_subscr_request_update_location' */ -int __real_gprs_subscr_request_update_location(struct sgsn_mm_ctx *mmctx); -int (*subscr_request_update_location_cb)(struct sgsn_mm_ctx *mmctx) = - &__real_gprs_subscr_request_update_location; - -int __wrap_gprs_subscr_request_update_location(struct sgsn_mm_ctx *mmctx) { - return (*subscr_request_update_location_cb)(mmctx); -}; - -/* override, requires '-Wl,--wrap=gprs_subscr_request_auth_info' */ -int __real_gprs_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx, const uint8_t *auts, const uint8_t *auts_rand); -int (*subscr_request_auth_info_cb)(struct sgsn_mm_ctx *mmctx, const uint8_t *auts, const uint8_t *auts_rand) = - &__real_gprs_subscr_request_auth_info; - -int __wrap_gprs_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx, const uint8_t *auts, const uint8_t *auts_rand) { - return (*subscr_request_auth_info_cb)(mmctx, auts, auts_rand); -}; - -/* override, requires '-Wl,--wrap=gsup_client_send' */ -int __real_osmo_gsup_client_send(struct osmo_gsup_client *gsupc, struct msgb *msg); -int (*osmo_gsup_client_send_cb)(struct osmo_gsup_client *gsupc, struct msgb *msg) = - &__real_osmo_gsup_client_send; - -int __wrap_osmo_gsup_client_send(struct osmo_gsup_client *gsupc, struct msgb *msg) -{ - return (*osmo_gsup_client_send_cb)(gsupc, msg); -}; - -static int count(struct llist_head *head) -{ - struct llist_head *cur; - int count = 0; - - llist_for_each(cur, head) - count += 1; - - return count; -} - -static struct msgb *create_msg(const uint8_t *data, size_t len) -{ - struct msgb *msg = msgb_alloc(len + 8, "test message"); - msg->l1h = msgb_put(msg, 8); - msg->l2h = msgb_put(msg, len); - memcpy(msg->l2h, data, len); - - msgb_bcid(msg) = msg->l1h; - msgb_gmmh(msg) = msg->l2h; - return msg; -} - -/* - * Create a context and search for it - */ -static struct sgsn_mm_ctx *alloc_mm_ctx(uint32_t tlli, struct gprs_ra_id *raid) -{ - struct sgsn_mm_ctx *ctx, *ictx; - struct gprs_llc_lle *lle; - int old_count = count(gprs_llme_list()); - - lle = gprs_lle_get_or_create(tlli, 3); - ctx = sgsn_mm_ctx_alloc_gb(tlli, raid); - ctx->gb.llme = lle->llme; - - ictx = sgsn_mm_ctx_by_tlli(tlli, raid); - OSMO_ASSERT(ictx == ctx); - - OSMO_ASSERT(count(gprs_llme_list()) == old_count + 1); - - return ctx; -} - -static void send_0408_message(struct gprs_llc_llme *llme, uint32_t tlli, - const struct gprs_ra_id *bssgp_raid, - const uint8_t *data, size_t data_len) -{ - struct msgb *msg; - - reset_last_msg(); - sgsn_tx_counter = 0; - - msg = create_msg(data, data_len); - msgb_tlli(msg) = tlli; - bssgp_create_cell_id(msgb_bcid(msg), bssgp_raid, 0); - gsm0408_gprs_rcvmsg_gb(msg, llme, false); - msgb_free(msg); -} - -static void test_llme(void) -{ - struct gprs_llc_lle *lle, *lle_copy; - uint32_t local_tlli; - - printf("Testing LLME allocations\n"); - local_tlli = gprs_tmsi2tlli(0x234, TLLI_LOCAL); - - /* initial state */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - - /* Create a new entry */ - lle = gprs_lle_get_or_create(local_tlli, 3); - OSMO_ASSERT(lle); - OSMO_ASSERT(count(gprs_llme_list()) == 1); - - /* No new entry is created */ - lle_copy = gprs_lle_get_or_create(local_tlli, 3); - OSMO_ASSERT(lle == lle_copy); - OSMO_ASSERT(count(gprs_llme_list()) == 1); - - /* unassign which should delete it*/ - gprs_llgmm_unassign(lle->llme); - - /* Check that everything was cleaned up */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - - cleanup_test(); -} - -struct gprs_subscr *last_updated_subscr = NULL; -void my_dummy_sgsn_update_subscriber_data(struct sgsn_mm_ctx *mmctx) -{ - OSMO_ASSERT(mmctx); - fprintf(stderr, "Called %s, mmctx = %p, subscr = %p\n", - __func__, mmctx, mmctx->subscr); - last_updated_subscr = mmctx->subscr; -} - -static void assert_subscr(const struct gprs_subscr *subscr, const char *imsi) -{ - struct gprs_subscr *sfound; - OSMO_ASSERT(subscr); - OSMO_ASSERT(strcmp(subscr->imsi, imsi) == 0); - - sfound = gprs_subscr_get_by_imsi(imsi); - OSMO_ASSERT(sfound == subscr); - - gprs_subscr_put(sfound); -} - -static void show_subscrs(FILE *out) -{ - struct gprs_subscr *subscr; - - llist_for_each_entry(subscr, gprs_subscribers, entry) { - fprintf(out, " Subscriber: %s, " - "use count: %d\n", - subscr->imsi, subscr->use_count); - } -} - -static void assert_no_subscrs() -{ - show_subscrs(stdout); - fflush(stdout); - OSMO_ASSERT(llist_empty(gprs_subscribers)); -} - -#define VERBOSE_ASSERT(val, expect_op, fmt) \ - do { \ - printf(#val " == " fmt "\n", (val)); \ - OSMO_ASSERT((val) expect_op); \ - } while (0); - -static void test_subscriber(void) -{ - struct gprs_subscr *s1, *s2, *s3; - const char *imsi1 = "1234567890"; - const char *imsi2 = "9876543210"; - const char *imsi3 = "5656565656"; - - update_subscriber_data_cb = my_dummy_sgsn_update_subscriber_data; - - printf("Testing core subscriber data API\n"); - - /* Check for emptiness */ - OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL); - OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi2) == NULL); - OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi3) == NULL); - VERBOSE_ASSERT(llist_count(gprs_subscribers), == 0, "%d"); - - /* Allocate entry 1 */ - s1 = gprs_subscr_get_or_create(imsi1); - VERBOSE_ASSERT(llist_count(gprs_subscribers), == 1, "%d"); - s1->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; - assert_subscr(s1, imsi1); - VERBOSE_ASSERT(llist_count(gprs_subscribers), == 1, "%d"); - OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi2) == NULL); - - /* Allocate entry 2 */ - s2 = gprs_subscr_get_or_create(imsi2); - VERBOSE_ASSERT(llist_count(gprs_subscribers), == 2, "%d"); - s2->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; - - /* Allocate entry 3 */ - s3 = gprs_subscr_get_or_create(imsi3); - VERBOSE_ASSERT(llist_count(gprs_subscribers), == 3, "%d"); - - /* Check entries */ - assert_subscr(s1, imsi1); - assert_subscr(s2, imsi2); - assert_subscr(s3, imsi3); - - /* Update entry 1 */ - last_updated_subscr = NULL; - gprs_subscr_update(s1); - OSMO_ASSERT(last_updated_subscr == NULL); - OSMO_ASSERT(s1->sgsn_data->mm == NULL); - OSMO_ASSERT((s1->flags & GPRS_SUBSCRIBER_FIRST_CONTACT) == 0); - - /* There is no subscriber cache. Verify it */ - gprs_subscr_cleanup(s1); - gprs_subscr_put(s1); - s1 = NULL; - VERBOSE_ASSERT(llist_count(gprs_subscribers), == 2, "%d"); - OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL); - - assert_subscr(s2, imsi2); - assert_subscr(s3, imsi3); - - /* Free entry 2 (GPRS_SUBSCRIBER_FIRST_CONTACT is set) */ - gprs_subscr_cleanup(s2); - gprs_subscr_put(s2); - s2 = NULL; - VERBOSE_ASSERT(llist_count(gprs_subscribers), == 1, "%d"); - OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL); - OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi2) == NULL); - assert_subscr(s3, imsi3); - - /* Try to delete entry 3 */ - gprs_subscr_cleanup(s3); - gprs_subscr_put(s3); - s3 = NULL; - VERBOSE_ASSERT(llist_count(gprs_subscribers), == 0, "%d"); - OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi3) == NULL); - - OSMO_ASSERT(llist_empty(gprs_subscribers)); - - update_subscriber_data_cb = __real_sgsn_update_subscriber_data; - - cleanup_test(); -} - -static void test_auth_triplets(void) -{ - struct gprs_subscr *s1, *s1found; - const char *imsi1 = "1234567890"; - struct gsm_auth_tuple *at; - struct sgsn_mm_ctx *ctx; - struct gprs_ra_id raid = { 0, }; - uint32_t local_tlli = 0xffeeddcc; - - printf("Testing authentication triplet handling\n"); - - /* Check for emptiness */ - OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL); - - /* Allocate entry 1 */ - s1 = gprs_subscr_get_or_create(imsi1); - s1->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; - s1found = gprs_subscr_get_by_imsi(imsi1); - OSMO_ASSERT(s1found == s1); - gprs_subscr_put(s1found); - - /* Create a context */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - ctx = alloc_mm_ctx(local_tlli, &raid); - - /* Attach s1 to ctx */ - ctx->subscr = gprs_subscr_get(s1); - ctx->subscr->sgsn_data->mm = ctx; - - /* Try to get auth tuple */ - at = sgsn_auth_get_tuple(ctx, GSM_KEY_SEQ_INVAL); - OSMO_ASSERT(at == NULL); - - /* Add triplets */ - s1->sgsn_data->auth_triplets[0].key_seq = 0; - s1->sgsn_data->auth_triplets[1].key_seq = 1; - s1->sgsn_data->auth_triplets[2].key_seq = 2; - - /* Try to get auth tuple */ - at = sgsn_auth_get_tuple(ctx, GSM_KEY_SEQ_INVAL); - OSMO_ASSERT(at != NULL); - OSMO_ASSERT(at->key_seq == 0); - OSMO_ASSERT(at->use_count == 1); - at = sgsn_auth_get_tuple(ctx, at->key_seq); - OSMO_ASSERT(at != NULL); - OSMO_ASSERT(at->key_seq == 1); - OSMO_ASSERT(at->use_count == 1); - at = sgsn_auth_get_tuple(ctx, at->key_seq); - OSMO_ASSERT(at != NULL); - OSMO_ASSERT(at->key_seq == 2); - OSMO_ASSERT(at->use_count == 1); - at = sgsn_auth_get_tuple(ctx, at->key_seq); - OSMO_ASSERT(at == NULL); - - /* Free MM context and subscriber */ - gprs_subscr_put(s1); - sgsn_mm_ctx_cleanup_free(ctx); - s1found = gprs_subscr_get_by_imsi(imsi1); - OSMO_ASSERT(s1found == NULL); - - cleanup_test(); -} - -#define TEST_GSUP_IMSI1_IE 0x01, 0x05, 0x21, 0x43, 0x65, 0x87, 0x09 - -static int rx_gsup_message(const uint8_t *data, size_t data_len) -{ - struct msgb *msg; - int rc; - - msg = msgb_alloc(1024, __func__); - msg->l2h = msgb_put(msg, data_len); - OSMO_ASSERT(msg->l2h != NULL); - memcpy(msg->l2h, data, data_len); - rc = gprs_subscr_rx_gsup_message(msg); - msgb_free(msg); - - return rc; -} - -static void test_subscriber_gsup(void) -{ - struct gprs_subscr *s1, *s1found; - const char *imsi1 = "1234567890"; - struct sgsn_mm_ctx *ctx; - struct gprs_ra_id raid = { 0, }; - uint32_t local_tlli = 0xffeeddcc; - struct sgsn_subscriber_pdp_data *pdpd; - int rc; - - static const uint8_t send_auth_info_res[] = { - 0x0a, - TEST_GSUP_IMSI1_IE, - 0x03, 0x22, /* Auth tuple */ - 0x20, 0x10, - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, - 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, - 0x21, 0x04, - 0x21, 0x22, 0x23, 0x24, - 0x22, 0x08, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x03, 0x22, /* Auth tuple */ - 0x20, 0x10, - 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, - 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, - 0x21, 0x04, - 0xa1, 0xa2, 0xa3, 0xa4, - 0x22, 0x08, - 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, - }; - - static const uint8_t send_auth_info_err[] = { - 0x09, - TEST_GSUP_IMSI1_IE, - 0x02, 0x01, 0x07 /* GPRS not allowed */ - }; - -#define MSISDN 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09 - - static const uint8_t s1_msisdn[] = { MSISDN }; - - static const uint8_t update_location_res[] = { - 0x06, - TEST_GSUP_IMSI1_IE, - 0x08, 0x09, MSISDN, - 0x04, 0x00, /* PDP info complete */ - 0x05, 0x12, - 0x10, 0x01, 0x01, - 0x11, 0x02, 0xf1, 0x21, /* IPv4 */ - 0x12, 0x09, 0x04, 't', 'e', 's', 't', 0x03, 'a', 'p', 'n', - 0x05, 0x11, - 0x10, 0x01, 0x02, - 0x11, 0x02, 0xf1, 0x21, /* IPv4 */ - 0x12, 0x08, 0x03, 'f', 'o', 'o', 0x03, 'a', 'p', 'n', - }; - -#undef MSISDN - - static const uint8_t update_location_err[] = { - 0x05, - TEST_GSUP_IMSI1_IE, - 0x02, 0x01, 0x07 /* GPRS not allowed */ - }; - - static const uint8_t location_cancellation_req[] = { - 0x1c, - TEST_GSUP_IMSI1_IE, - 0x06, 0x01, 0x00, - }; - - static const uint8_t location_cancellation_req_withdraw[] = { - 0x1c, - TEST_GSUP_IMSI1_IE, - 0x06, 0x01, 0x01, - }; - - static const uint8_t location_cancellation_req_other[] = { - 0x1c, - 0x01, 0x05, 0x11, 0x11, 0x11, 0x11, 0x01, - 0x06, 0x01, 0x00, - }; - - static const uint8_t purge_ms_err[] = { - 0x0d, - TEST_GSUP_IMSI1_IE, - 0x02, 0x01, 0x02, /* IMSI unknown in HLR */ - }; - - static const uint8_t purge_ms_err_no_cause[] = { - 0x0d, - TEST_GSUP_IMSI1_IE, - }; - - static const uint8_t purge_ms_res[] = { - 0x0e, - TEST_GSUP_IMSI1_IE, - 0x07, 0x00, - }; - - - static const uint8_t insert_data_req[] = { - 0x10, - TEST_GSUP_IMSI1_IE, - 0x05, 0x11, - 0x10, 0x01, 0x03, - 0x11, 0x02, 0xf1, 0x21, /* IPv4 */ - 0x12, 0x08, 0x03, 'b', 'a', 'r', 0x03, 'a', 'p', 'n', - }; - - static const uint8_t delete_data_req[] = { - 0x14, - TEST_GSUP_IMSI1_IE, - 0x10, 0x01, 0x03, - }; - - printf("Testing subscriber GSUP handling\n"); - - update_subscriber_data_cb = my_dummy_sgsn_update_subscriber_data; - - /* Check for emptiness */ - OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL); - - /* Allocate entry 1 */ - s1 = gprs_subscr_get_or_create(imsi1); - s1->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; - s1found = gprs_subscr_get_by_imsi(imsi1); - OSMO_ASSERT(s1found == s1); - gprs_subscr_put(s1found); - - /* Create a context */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - ctx = alloc_mm_ctx(local_tlli, &raid); - - /* Attach s1 to ctx */ - ctx->subscr = gprs_subscr_get(s1); - ctx->subscr->sgsn_data->mm = ctx; - - /* Inject SendAuthInfoReq GSUP message */ - rc = rx_gsup_message(send_auth_info_res, sizeof(send_auth_info_res)); - OSMO_ASSERT(rc >= 0); - OSMO_ASSERT(last_updated_subscr == s1); - - /* Check triplets */ - OSMO_ASSERT(s1->sgsn_data->auth_triplets[0].key_seq == 0); - OSMO_ASSERT(s1->sgsn_data->auth_triplets[1].key_seq == 1); - OSMO_ASSERT(s1->sgsn_data->auth_triplets[2].key_seq == GSM_KEY_SEQ_INVAL); - - /* Inject SendAuthInfoErr GSUP message */ - rc = rx_gsup_message(send_auth_info_err, sizeof(send_auth_info_err)); - OSMO_ASSERT(rc == -GMM_CAUSE_GPRS_NOTALLOWED); - OSMO_ASSERT(last_updated_subscr == s1); - OSMO_ASSERT(s1->sgsn_data->error_cause == GMM_CAUSE_GPRS_NOTALLOWED); - - /* Check triplets */ - OSMO_ASSERT(s1->sgsn_data->auth_triplets[0].key_seq == GSM_KEY_SEQ_INVAL); - OSMO_ASSERT(s1->sgsn_data->auth_triplets[1].key_seq == GSM_KEY_SEQ_INVAL); - OSMO_ASSERT(s1->sgsn_data->auth_triplets[2].key_seq == GSM_KEY_SEQ_INVAL); - - /* Inject UpdateLocRes GSUP message */ - rc = rx_gsup_message(update_location_res, sizeof(update_location_res)); - OSMO_ASSERT(rc >= 0); - OSMO_ASSERT(last_updated_subscr == s1); - OSMO_ASSERT(s1->flags & GPRS_SUBSCRIBER_ENABLE_PURGE); - OSMO_ASSERT(s1->sgsn_data->error_cause == SGSN_ERROR_CAUSE_NONE); - OSMO_ASSERT(s1->sgsn_data->msisdn_len == sizeof(s1_msisdn)); - OSMO_ASSERT(memcmp(s1->sgsn_data->msisdn, s1_msisdn, sizeof(s1_msisdn)) == 0); - OSMO_ASSERT(!llist_empty(&s1->sgsn_data->pdp_list)); - pdpd = llist_entry(s1->sgsn_data->pdp_list.next, - struct sgsn_subscriber_pdp_data, list); - OSMO_ASSERT(strcmp(pdpd->apn_str, "test.apn") == 0); - pdpd = llist_entry(pdpd->list.next, - struct sgsn_subscriber_pdp_data, list); - OSMO_ASSERT(strcmp(pdpd->apn_str, "foo.apn") == 0); - - /* Check authorization */ - OSMO_ASSERT(s1->authorized == 1); - - /* Inject UpdateLocErr GSUP message */ - rc = rx_gsup_message(update_location_err, sizeof(update_location_err)); - OSMO_ASSERT(rc == -GMM_CAUSE_GPRS_NOTALLOWED); - OSMO_ASSERT(last_updated_subscr == s1); - OSMO_ASSERT(s1->sgsn_data->error_cause == GMM_CAUSE_GPRS_NOTALLOWED); - - /* Check authorization */ - OSMO_ASSERT(s1->authorized == 0); - - /* Inject InsertSubscrData GSUP message */ - last_updated_subscr = NULL; - rc = rx_gsup_message(insert_data_req, sizeof(insert_data_req)); - OSMO_ASSERT(rc == -ENOTSUP); /* not connected */ - OSMO_ASSERT(last_updated_subscr == s1); - - /* Inject DeleteSubscrData GSUP message */ - last_updated_subscr = NULL; - rc = rx_gsup_message(delete_data_req, sizeof(delete_data_req)); - if (rc != -GMM_CAUSE_SEM_INCORR_MSG) - printf("Unexpected response to DSD: %d\n", rc); - OSMO_ASSERT(last_updated_subscr == NULL); - - /* Inject wrong LocCancelReq GSUP message */ - last_updated_subscr = NULL; - rc = rx_gsup_message(location_cancellation_req_other, - sizeof(location_cancellation_req_other)); - OSMO_ASSERT(rc == -GMM_CAUSE_IMSI_UNKNOWN); - OSMO_ASSERT(last_updated_subscr == NULL); - - /* Check cancellation result */ - OSMO_ASSERT(!(s1->flags & GPRS_SUBSCRIBER_CANCELLED)); - OSMO_ASSERT(s1->sgsn_data->mm != NULL); - - /* Inject LocCancelReq GSUP message */ - rc = rx_gsup_message(location_cancellation_req, - sizeof(location_cancellation_req)); - OSMO_ASSERT(rc >= 0); - OSMO_ASSERT(last_updated_subscr == s1); - OSMO_ASSERT(s1->sgsn_data->error_cause == SGSN_ERROR_CAUSE_NONE); - - /* Check cancellation result */ - OSMO_ASSERT(s1->flags & GPRS_SUBSCRIBER_CANCELLED); - OSMO_ASSERT(s1->sgsn_data->mm == NULL); - - /* Inject LocCancelReq(withdraw) GSUP message */ - rc = rx_gsup_message(location_cancellation_req_withdraw, - sizeof(location_cancellation_req_withdraw)); - OSMO_ASSERT(rc >= 0); - OSMO_ASSERT(s1->sgsn_data->error_cause == GMM_CAUSE_IMPL_DETACHED); - - /* Inject PurgeMsRes GSUP message */ - rc = rx_gsup_message(purge_ms_res, - sizeof(purge_ms_res)); - OSMO_ASSERT(rc >= 0); - OSMO_ASSERT(!(s1->flags & GPRS_SUBSCRIBER_ENABLE_PURGE)); - - /* Free MM context and subscriber */ - OSMO_ASSERT(ctx->subscr == NULL); - sgsn_mm_ctx_cleanup_free(ctx); - gprs_subscr_put(s1); - s1found = gprs_subscr_get_by_imsi(imsi1); - OSMO_ASSERT(s1found == NULL); - - /* Inject PurgeMsRes GSUP message */ - rc = rx_gsup_message(purge_ms_res, - sizeof(purge_ms_res)); - OSMO_ASSERT(rc >= 0); - - /* Inject PurgeMsErr(IMSI unknown in HLR) GSUP message */ - rc = rx_gsup_message(purge_ms_err, - sizeof(purge_ms_err)); - OSMO_ASSERT(rc == -GMM_CAUSE_IMSI_UNKNOWN); - - /* Inject PurgeMsErr() GSUP message */ - rc = rx_gsup_message(purge_ms_err_no_cause, - sizeof(purge_ms_err_no_cause)); - OSMO_ASSERT(rc == -GMM_CAUSE_NET_FAIL); - - /* Inject InsertSubscrData GSUP message (unknown IMSI) */ - last_updated_subscr = NULL; - rc = rx_gsup_message(insert_data_req, sizeof(insert_data_req)); - OSMO_ASSERT(rc == -GMM_CAUSE_IMSI_UNKNOWN); - OSMO_ASSERT(last_updated_subscr == NULL); - - /* Inject DeleteSubscrData GSUP message (unknown IMSI) */ - rc = rx_gsup_message(delete_data_req, sizeof(delete_data_req)); - OSMO_ASSERT(rc == -GMM_CAUSE_IMSI_UNKNOWN); - OSMO_ASSERT(last_updated_subscr == NULL); - - /* Inject LocCancelReq GSUP message (unknown IMSI) */ - rc = rx_gsup_message(location_cancellation_req, - sizeof(location_cancellation_req)); - OSMO_ASSERT(rc == -GMM_CAUSE_IMSI_UNKNOWN); - OSMO_ASSERT(last_updated_subscr == NULL); - - update_subscriber_data_cb = __real_sgsn_update_subscriber_data; - - cleanup_test(); -} - -int my_gsup_client_send_dummy(struct osmo_gsup_client *gsupc, struct msgb *msg) -{ - msgb_free(msg); - return 0; -}; - -/* - * Test that a GMM Detach will remove the MMCTX and the - * associated LLME. - */ -static void test_gmm_detach(void) -{ - struct gprs_ra_id raid = { 0, }; - struct sgsn_mm_ctx *ctx, *ictx; - uint32_t local_tlli; - - printf("Testing GMM detach\n"); - - /* DTAP - Detach Request (MO) */ - /* normal detach, power_off = 0 */ - static const unsigned char detach_req[] = { - 0x08, 0x05, 0x01, 0x18, 0x05, 0xf4, 0xef, 0xe2, - 0xb7, 0x00, 0x19, 0x03, 0xb9, 0x97, 0xcb - }; - - local_tlli = gprs_tmsi2tlli(0x23, TLLI_LOCAL); - - /* Create a context */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - ctx = alloc_mm_ctx(local_tlli, &raid); - - /* inject the detach */ - send_0408_message(ctx->gb.llme, local_tlli, &raid, - detach_req, ARRAY_SIZE(detach_req)); - - /* verify that a single message (hopefully the Detach Accept) has been - * sent by the SGSN */ - OSMO_ASSERT(sgsn_tx_counter == 1); - - /* verify that things are gone */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - ictx = sgsn_mm_ctx_by_tlli(local_tlli, &raid); - OSMO_ASSERT(!ictx); - - cleanup_test(); -} - -/* - * Test that a GMM Detach will remove the MMCTX and the associated LLME but - * will not sent a Detach Accept message (power_off = 1) - */ -static void test_gmm_detach_power_off(void) -{ - struct gprs_ra_id raid = { 0, }; - struct sgsn_mm_ctx *ctx, *ictx; - uint32_t local_tlli; - - printf("Testing GMM detach (power off)\n"); - - /* DTAP - Detach Request (MO) */ - /* normal detach, power_off = 1 */ - static const unsigned char detach_req[] = { - 0x08, 0x05, 0x09, 0x18, 0x05, 0xf4, 0xef, 0xe2, - 0xb7, 0x00, 0x19, 0x03, 0xb9, 0x97, 0xcb - }; - - local_tlli = gprs_tmsi2tlli(0x23, TLLI_LOCAL); - - /* Create a context */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - ctx = alloc_mm_ctx(local_tlli, &raid); - - /* inject the detach */ - send_0408_message(ctx->gb.llme, local_tlli, &raid, - detach_req, ARRAY_SIZE(detach_req)); - - /* verify that no message (and therefore no Detach Accept) has been - * sent by the SGSN */ - OSMO_ASSERT(sgsn_tx_counter == 0); - - /* verify that things are gone */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - ictx = sgsn_mm_ctx_by_tlli(local_tlli, &raid); - OSMO_ASSERT(!ictx); - - cleanup_test(); -} - -/* - * Test that a GMM Detach will remove the associated LLME if there is no MMCTX. - */ -static void test_gmm_detach_no_mmctx(void) -{ - struct gprs_ra_id raid = { 0, }; - struct gprs_llc_lle *lle; - uint32_t local_tlli; - - printf("Testing GMM detach (no MMCTX)\n"); - - /* DTAP - Detach Request (MO) */ - /* normal detach, power_off = 0 */ - static const unsigned char detach_req[] = { - 0x08, 0x05, 0x01, 0x18, 0x05, 0xf4, 0xef, 0xe2, - 0xb7, 0x00, 0x19, 0x03, 0xb9, 0x97, 0xcb - }; - - /* Create an LLME */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - local_tlli = gprs_tmsi2tlli(0x23, TLLI_LOCAL); - lle = gprs_lle_get_or_create(local_tlli, 3); - - OSMO_ASSERT(count(gprs_llme_list()) == 1); - - /* inject the detach */ - send_0408_message(lle->llme, local_tlli, &raid, - detach_req, ARRAY_SIZE(detach_req)); - - /* verify that the LLME is gone */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - - cleanup_test(); -} - -/* - * Test that a single GMM Detach Accept message will not cause the SGSN to send - * any message or leave an MM context at the SGSN. - */ -static void test_gmm_detach_accept_unexpected(void) -{ - struct gprs_ra_id raid = { 0, }; - struct gprs_llc_lle *lle; - uint32_t local_tlli; - - printf("Testing GMM detach accept (unexpected)\n"); - - /* DTAP - Detach Accept (MT) */ - /* normal detach */ - static const unsigned char detach_acc[] = { - 0x08, 0x06 - }; - - /* Create an LLME */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - local_tlli = gprs_tmsi2tlli(0x23, TLLI_LOCAL); - lle = gprs_lle_get_or_create(local_tlli, 3); - - /* inject the detach */ - send_0408_message(lle->llme, local_tlli, &raid, - detach_acc, ARRAY_SIZE(detach_acc)); - - /* verify that no message (and therefore no Status or XID reset) has been - * sent by the SGSN */ - OSMO_ASSERT(sgsn_tx_counter == 0); - - /* verify that things are gone */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - - cleanup_test(); -} - -/* - * Test that a GMM Status will remove the associated LLME if there is no MMCTX. - */ -static void test_gmm_status_no_mmctx(void) -{ - struct gprs_ra_id raid = { 0, }; - struct gprs_llc_lle *lle; - uint32_t local_tlli; - - printf("Testing GMM Status (no MMCTX)\n"); - - /* DTAP - GMM Status, protocol error */ - static const unsigned char gmm_status[] = { - 0x08, 0x20, 0x6f - }; - - /* Create an LLME */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - local_tlli = gprs_tmsi2tlli(0x23, TLLI_LOCAL); - lle = gprs_lle_get_or_create(local_tlli, 3); - - OSMO_ASSERT(count(gprs_llme_list()) == 1); - - /* inject the detach */ - send_0408_message(lle->llme, local_tlli, &raid, - gmm_status, ARRAY_SIZE(gmm_status)); - - /* verify that no message has been sent by the SGSN */ - OSMO_ASSERT(sgsn_tx_counter == 0); - - /* verify that the LLME is gone */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - - cleanup_test(); -} - -int my_subscr_request_update_location(struct sgsn_mm_ctx *mmctx) -{ - int rc; - rc = __real_gprs_subscr_request_update_location(mmctx); - if (rc == -ENOTSUP) { - OSMO_ASSERT(mmctx->subscr); - gprs_subscr_update(mmctx->subscr); - } - return rc; -} - -int my_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx, const uint8_t *auts, - const uint8_t *auts_rand) -{ - gprs_subscr_update(mmctx->subscr); - return 0; -} - -int my_subscr_request_auth_info_fake_auth(struct sgsn_mm_ctx *mmctx, const uint8_t *auts, - const uint8_t *auts_rand) -{ - /* Fake an authentication */ - OSMO_ASSERT(mmctx->subscr); - mmctx->sec_ctx = OSMO_AUTH_TYPE_GSM; - gprs_subscr_update_auth_info(mmctx->subscr); - - return 0; -} - -int my_subscr_request_auth_info_real_auth(struct sgsn_mm_ctx *mmctx, const uint8_t *auts, const uint8_t *auts_rand) -{ - struct gsm_auth_tuple at = { - .vec.sres = {0x51, 0xe5, 0x51, 0xe5}, - .vec.auth_types = OSMO_AUTH_TYPE_GSM, - .key_seq = 0 - }; - - /* Fake an authentication */ - OSMO_ASSERT(mmctx->subscr); - mmctx->subscr->sgsn_data->auth_triplets[0] = at; - - gprs_subscr_update_auth_info(mmctx->subscr); - - return 0; -} - -#define TEST_GSUP_IMSI_LONG_IE 0x01, 0x08, \ - 0x21, 0x43, 0x65, 0x87, 0x09, 0x21, 0x43, 0xf5 - -static int auth_info_skip = 0; -static int upd_loc_skip = 0; - -int my_subscr_request_auth_info_gsup_auth(struct sgsn_mm_ctx *mmctx, const uint8_t *auts, - const uint8_t *auts_rand) -{ - static const uint8_t send_auth_info_res[] = { - 0x0a, - TEST_GSUP_IMSI_LONG_IE, - 0x03, 0x22, /* Auth tuple */ - 0x20, 0x10, - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, - 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, - 0x21, 0x04, - 0x51, 0xe5, 0x51, 0xe5, - 0x22, 0x08, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - }; - - OSMO_ASSERT(!mmctx || mmctx->subscr); - - if (auth_info_skip > 0) { - auth_info_skip -= 1; - return -EAGAIN; - } - - /* Fake an SendAuthInfoRes */ - rx_gsup_message(send_auth_info_res, sizeof(send_auth_info_res)); - - return 0; -}; - -int my_subscr_request_update_gsup_auth(struct sgsn_mm_ctx *mmctx) { - static const uint8_t update_location_res[] = { - 0x06, - TEST_GSUP_IMSI_LONG_IE, - 0x04, 0x00, /* PDP info complete */ - 0x05, 0x12, - 0x10, 0x01, 0x01, - 0x11, 0x02, 0xf1, 0x21, /* IPv4 */ - 0x12, 0x09, 0x04, 't', 'e', 's', 't', 0x03, 'a', 'p', 'n', - 0x08, 0x07, /* MSISDN 49166213323 encoded */ - 0x91, 0x94, 0x61, 0x26, 0x31, 0x23, 0xF3, - 0x09, 0x07, /* MSISDN 38166213323 encoded */ - 0x91, 0x83, 0x61, 0x26, 0x31, 0x23, 0xF3, - }; - - OSMO_ASSERT(!mmctx || mmctx->subscr); - - if (upd_loc_skip > 0) { - upd_loc_skip -= 1; - return -EAGAIN; - } - - /* Fake an UpdateLocRes */ - return rx_gsup_message(update_location_res, sizeof(update_location_res)); -}; - -int my_gsup_client_send(struct osmo_gsup_client *gsupc, struct msgb *msg) -{ - struct osmo_gsup_message to_peer = {0}; - struct osmo_gsup_message from_peer = {0}; - struct msgb *reply_msg; - int rc; - - /* Simulate the GSUP peer */ - rc = osmo_gsup_decode(msgb_data(msg), msgb_length(msg), &to_peer); - OSMO_ASSERT(rc >= 0); - OSMO_ASSERT(to_peer.imsi[0] != 0); - osmo_strlcpy(from_peer.imsi, to_peer.imsi, sizeof(from_peer.imsi)); - - /* This invalidates the pointers in to_peer */ - msgb_free(msg); - - switch (to_peer.message_type) { - case OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: - /* Send UPDATE_LOCATION_RESULT */ - return my_subscr_request_update_gsup_auth(NULL); - - case OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST: - /* Send SEND_AUTH_INFO_RESULT */ - return my_subscr_request_auth_info_gsup_auth(NULL, NULL, NULL); - - case OSMO_GSUP_MSGT_PURGE_MS_REQUEST: - from_peer.message_type = OSMO_GSUP_MSGT_PURGE_MS_RESULT; - break; - - default: - if ((to_peer.message_type & 0b00000011) == 0) { - /* Unhandled request */ - /* Send error(NOT_IMPL) */ - from_peer.message_type = to_peer.message_type + 1; - from_peer.cause = GMM_CAUSE_MSGT_NOTEXIST_NOTIMPL; - break; - } - - /* Ignore it */ - return 0; - } - - reply_msg = osmo_gsup_client_msgb_alloc(); - reply_msg->l2h = reply_msg->data; - osmo_gsup_encode(reply_msg, &from_peer); - gprs_subscr_rx_gsup_message(reply_msg); - msgb_free(reply_msg); - - return 0; -}; - -/* - * Test the GMM Rejects - */ -static void test_gmm_reject(void) -{ - struct gprs_ra_id raid = { 0, }; - struct sgsn_mm_ctx *ctx = NULL; - uint32_t foreign_tlli; - struct gprs_llc_lle *lle; - int idx; - - /* DTAP - Attach Request */ - /* Invalid MI length */ - static const unsigned char attach_req_inv_mi_len[] = { - 0x08, 0x01, 0x02, 0xf5, 0xe0, 0x21, 0x08, 0x02, 0x09, 0xf4, - 0xfb, 0xc5, 0x46, 0x79, 0xff, 0xff, 0xff, 0xff, 0x11, 0x22, - 0x33, 0x40, 0x50, 0x60, 0x19, 0x18, 0xb3, 0x43, 0x2b, 0x25, - 0x96, 0x62, 0x00, 0x60, 0x80, 0x9a, 0xc2, 0xc6, 0x62, 0x00, - 0x60, 0x80, 0xba, 0xc8, 0xc6, 0x62, 0x00, 0x60, 0x80, 0x00 - }; - - /* DTAP - Attach Request */ - /* Invalid MI type (IMEI) */ - static const unsigned char attach_req_inv_mi_type[] = { - 0x08, 0x01, 0x02, 0xf5, 0xe0, 0x21, 0x08, 0x02, 0x05, 0xf2, - 0xfb, 0xc5, 0x46, 0x79, 0x11, 0x22, 0x33, 0x40, 0x50, 0x60, - 0x19, 0x18, 0xb3, 0x43, 0x2b, 0x25, 0x96, 0x62, 0x00, 0x60, - 0x80, 0x9a, 0xc2, 0xc6, 0x62, 0x00, 0x60, 0x80, 0xba, 0xc8, - 0xc6, 0x62, 0x00, 0x60, 0x80, 0x00 - }; - - /* DTAP - Routing Area Update Request */ - static const unsigned char dtap_ra_upd_req[] = { - 0x08, 0x08, 0x10, 0x11, 0x22, 0x33, 0x40, 0x50, - 0x60, 0x1d, 0x19, 0x13, 0x42, 0x33, 0x57, 0x2b, - 0xf7, 0xc8, 0x48, 0x02, 0x13, 0x48, 0x50, 0xc8, - 0x48, 0x02, 0x14, 0x48, 0x50, 0xc8, 0x48, 0x02, - 0x17, 0x49, 0x10, 0xc8, 0x48, 0x02, 0x00, 0x19, - 0x8b, 0xb2, 0x92, 0x17, 0x16, 0x27, 0x07, 0x04, - 0x31, 0x02, 0xe5, 0xe0, 0x32, 0x02, 0x20, 0x00 - }; - - /* DTAP - Routing Area Update Request */ - /* Invalid type: GPRS_UPD_T_RA_LA_IMSI_ATT */ - static const unsigned char dtap_ra_upd_req_inv_type[] = { - 0x08, 0x08, 0x12, 0x11, 0x22, 0x33, 0x40, 0x50, - 0x60, 0x1d, 0x19, 0x13, 0x42, 0x33, 0x57, 0x2b, - 0xf7, 0xc8, 0x48, 0x02, 0x13, 0x48, 0x50, 0xc8, - 0x48, 0x02, 0x14, 0x48, 0x50, 0xc8, 0x48, 0x02, - 0x17, 0x49, 0x10, 0xc8, 0x48, 0x02, 0x00, 0x19, - 0x8b, 0xb2, 0x92, 0x17, 0x16, 0x27, 0x07, 0x04, - 0x31, 0x02, 0xe5, 0xe0, 0x32, 0x02, 0x20, 0x00 - }; - - /* DTAP - Routing Area Update Request */ - /* Invalid cap length */ - static const unsigned char dtap_ra_upd_req_inv_cap_len[] = { - 0x08, 0x08, 0x10, 0x11, 0x22, 0x33, 0x40, 0x50, - 0x60, 0x3d, 0x19, 0x13, 0x42, 0x33, 0x57, 0x2b, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xf7, 0xc8, 0x48, 0x02, 0x13, 0x48, 0x50, 0xc8, - 0x48, 0x02, 0x14, 0x48, 0x50, 0xc8, 0x48, 0x02, - 0x17, 0x49, 0x10, 0xc8, 0x48, 0x02, 0x00, 0x19, - 0x8b, 0xb2, 0x92, 0x17, 0x16, 0x27, 0x07, 0x04, - 0x31, 0x02, 0xe5, 0xe0, 0x32, 0x02, 0x20, 0x00 - }; - - struct test { - const char *title; - const unsigned char *msg; - unsigned msg_len; - unsigned num_resp; - - }; - static struct test tests[] = { - { - .title = "Attach Request (invalid MI length)", - .msg = attach_req_inv_mi_len, - .msg_len = sizeof(attach_req_inv_mi_len), - .num_resp = 1 /* Reject */ - - }, - { - .title = "Attach Request (invalid MI type)", - .msg = attach_req_inv_mi_type, - .msg_len = sizeof(attach_req_inv_mi_type), - .num_resp = 1 /* Reject */ - }, - { - .title = "Routing Area Update Request (valid)", - .msg = dtap_ra_upd_req, - .msg_len = sizeof(dtap_ra_upd_req), - .num_resp = 2 /* XID Reset + Reject */ - }, - { - .title = "Routing Area Update Request (invalid type)", - .msg = dtap_ra_upd_req_inv_type, - .msg_len = sizeof(dtap_ra_upd_req_inv_type), - .num_resp = 1 /* Reject */ - }, - { - .title = "Routing Area Update Request (invalid CAP length)", - .msg = dtap_ra_upd_req_inv_cap_len, - .msg_len = sizeof(dtap_ra_upd_req_inv_cap_len), - .num_resp = 1 /* Reject */ - }, - }; - - printf("Testing GMM reject\n"); - - /* reset the PRNG used by sgsn_alloc_ptmsi */ - srand(1); - - foreign_tlli = gprs_tmsi2tlli(0xc0000023, TLLI_FOREIGN); - - OSMO_ASSERT(count(gprs_llme_list()) == 0); - - for (idx = 0; idx < ARRAY_SIZE(tests); idx++) { - const struct test *test = &tests[idx]; - printf(" - %s\n", test->title); - - /* Create a LLE/LLME */ - lle = gprs_lle_get_or_create(foreign_tlli, 3); - OSMO_ASSERT(count(gprs_llme_list()) == 1); - - /* Inject the Request message */ - send_0408_message(lle->llme, foreign_tlli, &raid, - test->msg, test->msg_len); - - /* We expect a Reject message */ - fprintf(stderr, "sgsn_tx_counter = %d (expected %d)\n", - sgsn_tx_counter, test->num_resp); - OSMO_ASSERT(sgsn_tx_counter == test->num_resp); - - /* verify that LLME/MM are removed */ - ctx = sgsn_mm_ctx_by_tlli(foreign_tlli, &raid); - OSMO_ASSERT(ctx == NULL); - OSMO_ASSERT(count(gprs_llme_list()) == 0); - } - - cleanup_test(); -} - -/* - * Test cancellation of attached MM contexts - */ -static void test_gmm_cancel(void) -{ - struct gprs_ra_id raid = { 0, }; - struct sgsn_mm_ctx *ctx = NULL; - struct sgsn_mm_ctx *ictx; - uint32_t ptmsi1; - uint32_t foreign_tlli; - uint32_t local_tlli = 0; - struct gprs_llc_lle *lle; - const enum sgsn_auth_policy saved_auth_policy = sgsn->cfg.auth_policy; - - /* DTAP - Attach Request */ - /* The P-TMSI is not known by the SGSN */ - static const unsigned char attach_req[] = { - 0x08, 0x01, 0x02, 0xf5, 0xe0, 0x21, 0x08, 0x02, 0x05, 0xf4, - 0xfb, 0xc5, 0x46, 0x79, 0x11, 0x22, 0x33, 0x40, 0x50, 0x60, - 0x19, 0x18, 0xb3, 0x43, 0x2b, 0x25, 0x96, 0x62, 0x00, 0x60, - 0x80, 0x9a, 0xc2, 0xc6, 0x62, 0x00, 0x60, 0x80, 0xba, 0xc8, - 0xc6, 0x62, 0x00, 0x60, 0x80, 0x00 - }; - - /* DTAP - Identity Response IMEI */ - static const unsigned char ident_resp_imei[] = { - 0x08, 0x16, 0x08, 0x9a, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, - 0x56 - }; - - /* DTAP - Identity Response IMSI */ - static const unsigned char ident_resp_imsi[] = { - 0x08, 0x16, 0x08, 0x19, 0x32, 0x54, 0x76, 0x98, 0x10, 0x32, - 0x54 - }; - - /* DTAP - Attach Complete */ - static const unsigned char attach_compl[] = { - 0x08, 0x03 - }; - - printf("Testing cancellation\n"); - - sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_OPEN; - - foreign_tlli = gprs_tmsi2tlli(0xc0000023, TLLI_FOREIGN); - - /* Create a LLE/LLME */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - lle = gprs_lle_get_or_create(foreign_tlli, 3); - OSMO_ASSERT(count(gprs_llme_list()) == 1); - - /* inject the attach request */ - send_0408_message(lle->llme, foreign_tlli, &raid, - attach_req, ARRAY_SIZE(attach_req)); - - ctx = sgsn_mm_ctx_by_tlli(foreign_tlli, &raid); - OSMO_ASSERT(ctx != NULL); - OSMO_ASSERT(ctx->gmm_fsm->state == ST_GMM_COMMON_PROC_INIT); - - /* we expect an identity request (IMEI) */ - OSMO_ASSERT(sgsn_tx_counter == 1); - - /* inject the identity response (IMEI) */ - send_0408_message(ctx->gb.llme, foreign_tlli, &raid, - ident_resp_imei, ARRAY_SIZE(ident_resp_imei)); - - /* we expect an identity request (IMSI) */ - OSMO_ASSERT(sgsn_tx_counter == 1); - - /* inject the identity response (IMSI) */ - send_0408_message(ctx->gb.llme, foreign_tlli, &raid, - ident_resp_imsi, ARRAY_SIZE(ident_resp_imsi)); - - /* check that the MM context has not been removed due to a failed - * authorization */ - OSMO_ASSERT(ctx == sgsn_mm_ctx_by_tlli(foreign_tlli, &raid)); - - OSMO_ASSERT(ctx->gmm_fsm->state == ST_GMM_COMMON_PROC_INIT); - - /* we expect an attach accept/reject */ - OSMO_ASSERT(sgsn_tx_counter == 1); - ptmsi1 = get_new_ptmsi(&last_dl_parse_ctx); - OSMO_ASSERT(ptmsi1 != GSM_RESERVED_TMSI); - - /* this has been randomly assigned by the SGSN */ - local_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); - - /* inject the attach complete */ - send_0408_message(ctx->gb.llme, foreign_tlli, &raid, - attach_compl, ARRAY_SIZE(attach_compl)); - - OSMO_ASSERT(ctx->gmm_fsm->state == ST_GMM_REGISTERED_NORMAL); - - /* we don't expect a response */ - OSMO_ASSERT(sgsn_tx_counter == 0); - - /* cancel */ - gsm0408_gprs_access_cancelled(ctx, 0); - - /* verify that things are gone */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - ictx = sgsn_mm_ctx_by_tlli(local_tlli, &raid); - OSMO_ASSERT(!ictx); - - sgsn->cfg.auth_policy = saved_auth_policy; - - cleanup_test(); -} - -static void test_apn_matching(void) -{ - struct apn_ctx *actx, *actxs[9]; - - printf("Testing APN matching\n"); - - actxs[0] = sgsn_apn_ctx_find_alloc("*.test", ""); - actxs[1] = sgsn_apn_ctx_find_alloc("*.def.test", ""); - actxs[2] = sgsn_apn_ctx_find_alloc("abc.def.test", ""); - actxs[3] = NULL; - - actxs[4] = sgsn_apn_ctx_find_alloc("abc.def.test", "456"); - actxs[5] = sgsn_apn_ctx_find_alloc("abc.def.test", "456123"); - actxs[6] = sgsn_apn_ctx_find_alloc("*.def.test", "456"); - actxs[7] = sgsn_apn_ctx_find_alloc("*.def.test", "456123"); - - actxs[8] = sgsn_apn_ctx_find_alloc("ghi.def.test", "456"); - - actx = sgsn_apn_ctx_match("abc.def.test", "12345678"); - OSMO_ASSERT(actx == actxs[2]); - actx = sgsn_apn_ctx_match("aBc.dEf.test", "12345678"); - OSMO_ASSERT(actx == actxs[2]); - actx = sgsn_apn_ctx_match("xyz.def.test", "12345678"); - OSMO_ASSERT(actx == actxs[1]); - actx = sgsn_apn_ctx_match("xyz.dEf.test", "12345678"); - OSMO_ASSERT(actx == actxs[1]); - actx = sgsn_apn_ctx_match("xyz.uvw.test", "12345678"); - OSMO_ASSERT(actx == actxs[0]); - actx = sgsn_apn_ctx_match("xyz.uvw.foo", "12345678"); - OSMO_ASSERT(actx == NULL); - - actxs[3] = sgsn_apn_ctx_find_alloc("*", ""); - actx = sgsn_apn_ctx_match("xyz.uvw.foo", "12345678"); - OSMO_ASSERT(actx == actxs[3]); - - actx = sgsn_apn_ctx_match("abc.def.test", "45699900"); - OSMO_ASSERT(actx == actxs[4]); - - actx = sgsn_apn_ctx_match("xyz.def.test", "45699900"); - OSMO_ASSERT(actx == actxs[6]); - - actx = sgsn_apn_ctx_match("abc.def.test", "45612300"); - OSMO_ASSERT(actx == actxs[5]); - - actx = sgsn_apn_ctx_match("xyz.def.test", "45612300"); - OSMO_ASSERT(actx == actxs[7]); - - actx = sgsn_apn_ctx_match("ghi.def.test", "45699900"); - OSMO_ASSERT(actx == actxs[8]); - - actx = sgsn_apn_ctx_match("ghi.def.test", "45612300"); - OSMO_ASSERT(actx == actxs[7]); - - /* Free APN contexts and check how the matching changes */ - - sgsn_apn_ctx_free(actxs[7]); - actx = sgsn_apn_ctx_match("ghi.def.test", "45612300"); - OSMO_ASSERT(actx == actxs[8]); - - sgsn_apn_ctx_free(actxs[8]); - actx = sgsn_apn_ctx_match("ghi.def.test", "45612300"); - OSMO_ASSERT(actx == actxs[6]); - - sgsn_apn_ctx_free(actxs[6]); - actx = sgsn_apn_ctx_match("ghi.def.test", "45612300"); - OSMO_ASSERT(actx == actxs[1]); - - sgsn_apn_ctx_free(actxs[5]); - actx = sgsn_apn_ctx_match("abc.def.test", "45612300"); - OSMO_ASSERT(actx == actxs[4]); - - sgsn_apn_ctx_free(actxs[4]); - actx = sgsn_apn_ctx_match("abc.def.test", "45612300"); - OSMO_ASSERT(actx == actxs[2]); - - sgsn_apn_ctx_free(actxs[2]); - actx = sgsn_apn_ctx_match("abc.def.test", "12345678"); - OSMO_ASSERT(actx == actxs[1]); - - sgsn_apn_ctx_free(actxs[1]); - actx = sgsn_apn_ctx_match("abc.def.test", "12345678"); - OSMO_ASSERT(actx == actxs[0]); - - sgsn_apn_ctx_free(actxs[0]); - actx = sgsn_apn_ctx_match("abc.def.test", "12345678"); - OSMO_ASSERT(actx == actxs[3]); - - sgsn_apn_ctx_free(actxs[3]); - actx = sgsn_apn_ctx_match("abc.def.test", "12345678"); - OSMO_ASSERT(actx == NULL); - - cleanup_test(); -} - -struct sgsn_subscriber_pdp_data* sgsn_subscriber_pdp_data_alloc( - struct sgsn_subscriber_data *sdata); - -static void test_ggsn_selection(void) -{ - struct apn_ctx *actxs[4]; - struct sgsn_ggsn_ctx *ggc, *ggcs[3]; - struct gprs_subscr *s1; - const char *imsi1 = "1234567890"; - struct sgsn_mm_ctx *ctx; - struct gprs_ra_id raid = { 0, }; - uint32_t local_tlli = 0xffeeddcc; - enum gsm48_gsm_cause gsm_cause; - struct tlv_parsed tp; - uint8_t apn_enc[GSM_APN_LENGTH + 10]; - struct sgsn_subscriber_pdp_data *pdp_data; - char apn_str[GSM_APN_LENGTH]; - - printf("Testing GGSN selection\n"); - - osmo_gsup_client_send_cb = my_gsup_client_send_dummy; - - /* Check for emptiness */ - OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL); - - /* Create a context */ - OSMO_ASSERT(count(gprs_llme_list()) == 0); - ctx = alloc_mm_ctx(local_tlli, &raid); - osmo_strlcpy(ctx->imsi, imsi1, sizeof(ctx->imsi)); - - /* Allocate and attach a subscriber */ - s1 = gprs_subscr_get_or_create_by_mmctx(ctx); - assert_subscr(s1, imsi1); - - tp.lv[GSM48_IE_GSM_APN].len = 0; - tp.lv[GSM48_IE_GSM_APN].val = apn_enc; - - /* TODO: Add PDP info entries to s1 */ - - ggcs[0] = sgsn_ggsn_ctx_find_alloc(0); - ggcs[1] = sgsn_ggsn_ctx_find_alloc(1); - ggcs[2] = sgsn_ggsn_ctx_find_alloc(2); - - actxs[0] = sgsn_apn_ctx_find_alloc("test.apn", "123456"); - actxs[0]->ggsn = ggcs[0]; - actxs[1] = sgsn_apn_ctx_find_alloc("*.apn", "123456"); - actxs[1]->ggsn = ggcs[1]; - actxs[2] = sgsn_apn_ctx_find_alloc("*", "456789"); - actxs[2]->ggsn = ggcs[2]; - - pdp_data = sgsn_subscriber_pdp_data_alloc(s1->sgsn_data); - pdp_data->context_id = 1; - pdp_data->pdp_type = 0x0121; - osmo_strlcpy(pdp_data->apn_str, "*", sizeof(pdp_data->apn_str)); - - /* Resolve GGSNs */ - - tp.lv[GSM48_IE_GSM_APN].len = - gprs_str_to_apn(apn_enc, sizeof(apn_enc), "Test.Apn"); - - ggc = sgsn_mm_ctx_find_ggsn_ctx(ctx, &tp, &gsm_cause, apn_str); - OSMO_ASSERT(ggc != NULL); - OSMO_ASSERT(ggc->id == 0); - OSMO_ASSERT(strcmp(apn_str, "Test.Apn") == 0); - - tp.lv[GSM48_IE_GSM_APN].len = - gprs_str_to_apn(apn_enc, sizeof(apn_enc), "Other.Apn"); - - ggc = sgsn_mm_ctx_find_ggsn_ctx(ctx, &tp, &gsm_cause, apn_str); - OSMO_ASSERT(ggc != NULL); - OSMO_ASSERT(ggc->id == 1); - OSMO_ASSERT(strcmp(apn_str, "Other.Apn") == 0); - - tp.lv[GSM48_IE_GSM_APN].len = 0; - tp.lv[GSM48_IE_GSM_APN].val = NULL; - - ggc = sgsn_mm_ctx_find_ggsn_ctx(ctx, &tp, &gsm_cause, apn_str); - OSMO_ASSERT(ggc != NULL); - OSMO_ASSERT(ggc->id == 0); - OSMO_ASSERT(strcmp(apn_str, "") == 0); - - actxs[3] = sgsn_apn_ctx_find_alloc("*", "123456"); - actxs[3]->ggsn = ggcs[2]; - ggc = sgsn_mm_ctx_find_ggsn_ctx(ctx, &tp, &gsm_cause, apn_str); - OSMO_ASSERT(ggc != NULL); - OSMO_ASSERT(ggc->id == 2); - OSMO_ASSERT(strcmp(apn_str, "") == 0); - - sgsn_apn_ctx_free(actxs[3]); - tp.lv[GSM48_IE_GSM_APN].val = apn_enc; - - tp.lv[GSM48_IE_GSM_APN].len = - gprs_str_to_apn(apn_enc, sizeof(apn_enc), "Foo.Bar"); - - ggc = sgsn_mm_ctx_find_ggsn_ctx(ctx, &tp, &gsm_cause, apn_str); - OSMO_ASSERT(ggc == NULL); - OSMO_ASSERT(gsm_cause == GSM_CAUSE_MISSING_APN); - OSMO_ASSERT(strcmp(apn_str, "Foo.Bar") == 0); - - tp.lv[GSM48_IE_GSM_APN].len = sizeof(apn_enc); - ggc = sgsn_mm_ctx_find_ggsn_ctx(ctx, &tp, &gsm_cause, apn_str); - OSMO_ASSERT(ggc == NULL); - OSMO_ASSERT(gsm_cause == GSM_CAUSE_INV_MAND_INFO); - - /* Add PDP data entry to subscriber */ - - osmo_strlcpy(pdp_data->apn_str, "Test.Apn", sizeof(pdp_data->apn_str)); - - tp.lv[GSM48_IE_GSM_APN].len = - gprs_str_to_apn(apn_enc, sizeof(apn_enc), "Test.Apn"); - - ggc = sgsn_mm_ctx_find_ggsn_ctx(ctx, &tp, &gsm_cause, apn_str); - OSMO_ASSERT(ggc != NULL); - OSMO_ASSERT(ggc->id == 0); - OSMO_ASSERT(strcmp(apn_str, "Test.Apn") == 0); - - tp.lv[GSM48_IE_GSM_APN].len = - gprs_str_to_apn(apn_enc, sizeof(apn_enc), "Other.Apn"); - - ggc = sgsn_mm_ctx_find_ggsn_ctx(ctx, &tp, &gsm_cause, apn_str); - OSMO_ASSERT(ggc == NULL); - OSMO_ASSERT(gsm_cause == GSM_CAUSE_REQ_SERV_OPT_NOTSUB); - OSMO_ASSERT(strcmp(apn_str, "") == 0); - - /* Cleanup */ - - gprs_subscr_put(s1); - sgsn_mm_ctx_cleanup_free(ctx); - - assert_no_subscrs(); - - sgsn_apn_ctx_free(actxs[0]); - sgsn_apn_ctx_free(actxs[1]); - sgsn_apn_ctx_free(actxs[2]); - - sgsn_ggsn_ctx_free(ggcs[0]); - sgsn_ggsn_ctx_free(ggcs[1]); - sgsn_ggsn_ctx_free(ggcs[2]); - - osmo_gsup_client_send_cb = __real_osmo_gsup_client_send; - - cleanup_test(); -} - -bool pdp_status_has_active_nsapis(const uint8_t *pdp_status, const size_t pdp_status_len); - -static void test_pdp_status_has_active_nsapis(void) -{ - const size_t pdp_status_len = 2; - const uint8_t pdp_status1[] = { 0b00100000, 0b00000000 }; /* PDP NSAPI 5 active */ - const uint8_t pdp_status2[] = { 0b00000000, 0b00000000 }; /* no active PDP NSAPI */ - const uint8_t pdp_status3[] = { 0b00000000, 0b00000001 }; /* PDP NSAPI 8 active */ - - printf("Testing pdp_status_has_active_nsapis\n"); - - OSMO_ASSERT(pdp_status_has_active_nsapis(pdp_status1, pdp_status_len)); - OSMO_ASSERT(!pdp_status_has_active_nsapis(pdp_status2, pdp_status_len)); - OSMO_ASSERT(pdp_status_has_active_nsapis(pdp_status3, pdp_status_len)); -} - -static struct log_info_cat gprs_categories[] = { - [DMM] = { - .name = "DMM", - .description = "Layer3 Mobility Management (MM)", - .color = "\033[1;33m", - .enabled = 1, .loglevel = LOGL_DEBUG, - }, - [DPAG] = { - .name = "DPAG", - .description = "Paging Subsystem", - .color = "\033[1;38m", - .enabled = 1, .loglevel = LOGL_NOTICE, - }, - [DMEAS] = { - .name = "DMEAS", - .description = "Radio Measurement Processing", - .enabled = 0, .loglevel = LOGL_NOTICE, - }, - [DREF] = { - .name = "DREF", - .description = "Reference Counting", - .enabled = 0, .loglevel = LOGL_NOTICE, - }, - [DGPRS] = { - .name = "DGPRS", - .description = "GPRS Packet Service", - .enabled = 1, .loglevel = LOGL_DEBUG, - }, - [DNS] = { - .name = "DNS", - .description = "GPRS Network Service (NS)", - .enabled = 1, .loglevel = LOGL_INFO, - }, - [DLLC] = { - .name = "DLLC", - .description = "GPRS Logical Link Control Protocol (LLC)", - .enabled = 1, .loglevel = LOGL_DEBUG, - }, - [DSNDCP] = { - .name = "DSNDCP", - .description = "GPRS Sub-Network Dependent Control Protocol (SNDCP)", - .enabled = 1, .loglevel = LOGL_DEBUG, - }, -}; - -static struct log_info info = { - .cat = gprs_categories, - .num_cat = ARRAY_SIZE(gprs_categories), -}; - -static struct vty_app_info vty_info = { - .name = "testSGSN", -}; - -int main(int argc, char **argv) -{ - void *osmo_sgsn_ctx; - void *msgb_ctx; - - osmo_sgsn_ctx = talloc_named_const(NULL, 0, "osmo_sgsn"); - osmo_init_logging2(osmo_sgsn_ctx, &info); - tall_sgsn_ctx = talloc_named_const(osmo_sgsn_ctx, 0, "sgsn"); - msgb_ctx = msgb_talloc_ctx_init(osmo_sgsn_ctx, 0); - - sgsn_rate_ctr_init(); - sgsn_auth_init(sgsn); - gprs_subscr_init(sgsn); - vty_init(&vty_info); - sgsn_vty_init(&sgsn->cfg); - - test_llme(); - test_subscriber(); - test_auth_triplets(); - test_subscriber_gsup(); - test_gmm_detach(); - test_gmm_detach_power_off(); - test_gmm_detach_no_mmctx(); - test_gmm_detach_accept_unexpected(); - test_gmm_status_no_mmctx(); - test_gmm_reject(); - test_gmm_cancel(); - test_apn_matching(); - test_ggsn_selection(); - test_pdp_status_has_active_nsapis(); - printf("Done\n"); - - talloc_report_full(osmo_sgsn_ctx, stderr); - OSMO_ASSERT(talloc_total_blocks(msgb_ctx) == 1); - OSMO_ASSERT(talloc_total_blocks(tall_sgsn_ctx) == 2); - return 0; -} - - -/* stubs */ -struct osmo_prim_hdr; -int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx) -{ - abort(); -} diff --git a/tests/sgsn/sgsn_test.ok b/tests/sgsn/sgsn_test.ok deleted file mode 100644 index 35b1d7bb..00000000 --- a/tests/sgsn/sgsn_test.ok +++ /dev/null @@ -1,28 +0,0 @@ -Testing LLME allocations -Testing core subscriber data API -llist_count(gprs_subscribers) == 0 -llist_count(gprs_subscribers) == 1 -llist_count(gprs_subscribers) == 1 -llist_count(gprs_subscribers) == 2 -llist_count(gprs_subscribers) == 3 -llist_count(gprs_subscribers) == 2 -llist_count(gprs_subscribers) == 1 -llist_count(gprs_subscribers) == 0 -Testing authentication triplet handling -Testing subscriber GSUP handling -Testing GMM detach -Testing GMM detach (power off) -Testing GMM detach (no MMCTX) -Testing GMM detach accept (unexpected) -Testing GMM Status (no MMCTX) -Testing GMM reject - - Attach Request (invalid MI length) - - Attach Request (invalid MI type) - - Routing Area Update Request (valid) - - Routing Area Update Request (invalid type) - - Routing Area Update Request (invalid CAP length) -Testing cancellation -Testing APN matching -Testing GGSN selection -Testing pdp_status_has_active_nsapis -Done diff --git a/tests/slhc/Makefile.am b/tests/slhc/Makefile.am deleted file mode 100644 index b6738c25..00000000 --- a/tests/slhc/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBCARES_CFLAGS) - -EXTRA_DIST = slhc_test.ok - -noinst_PROGRAMS = slhc_test - -slhc_test_SOURCES = slhc_test.c - -slhc_test_LDADD = \ - $(top_builddir)/src/sgsn/slhc.o \ - $(LIBOSMOCORE_LIBS) - - diff --git a/tests/slhc/slhc_test.c b/tests/slhc/slhc_test.c deleted file mode 100644 index 5c133135..00000000 --- a/tests/slhc/slhc_test.c +++ /dev/null @@ -1,275 +0,0 @@ -/* Test SLHC/RFC1144 TCP/IP Header compression/decompression */ - -/* (C) 2016 by sysmocom s.f.m.c. GmbH - * All Rights Reserved - * - * Author: Philipp Maier - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -#include -#include - -#include -#include - -#include - -#include -#include -#include - -/* Number of compression slots (S0-1) */ -#define SLOTS 8 - -/* Maximum packet bytes to display */ -#define DISP_MAX_BYTES 100 - -/* Sample packets to test with */ -#define PACKETS_LEN 15 -char *packets[] = { - /* With TCP Option 10 (Timestamps) in place (forces UNCOMPRESSED_TCP) */ - "4510004046dd40004006a9a7c0a8646ec0a864640017ad8b81980100f3ac984d801800e32a1600000101080a000647de06d1bf5efffd18fffd20fffd23fffd27", - "4510005b46de40004006a98bc0a8646ec0a864640017ad8b8198010cf3ac984d801800e3867500000101080a000647df06d1bf61fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0", - "4510003746df40004006a9aec0a8646ec0a864640017ad8b81980133f3ac989f801800e35fd700000101080a000647e106d1bf63fffd01", - "4510003746e040004006a9adc0a8646ec0a864640017ad8b81980136f3ac98a2801800e35fd200000101080a000647e106d1bf64fffb01", - "4510007446e140004006a96fc0a8646ec0a864640017ad8b81980139f3ac98a5801800e37b9b00000101080a000647e206d1bf640d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a57656c6c636f6d6520746f20706f6c6c75780d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a0d0a", - "4510004246e240004006a9a0c0a8646ec0a864640017ad8b81980179f3ac98a5801800e3dab000000101080a000647ec06d1bf6f706f6c6c7578206c6f67696e3a20", - /* Regular TCP packets (COMPRESSED_TCP) */ - "4510003446dd40004006a9b3c0a8646ec0a864640017ad8b81980100f3ac984d501800e371410000fffd18fffd20fffd23fffd27", - "4510004f46de40004006a997c0a8646ec0a864640017ad8b8198010cf3ac984d501800e3cda40000fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0", - "4510002b46df40004006a9bac0a8646ec0a864640017ad8b81980133f3ac989f501800e3a70a0000fffd01", - "4510002b46e040004006a9b9c0a8646ec0a864640017ad8b81980136f3ac98a2501800e3a7060000fffb01", - "4510006846e140004006a97bc0a8646ec0a864640017ad8b81980139f3ac98a5501800e3c2d000000d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a57656c6c636f6d6520746f20706f6c6c75780d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a0d0a", - "4510003646e240004006a9acc0a8646ec0a864640017ad8b81980179f3ac98a5501800e321fb0000706f6c6c7578206c6f67696e3a20", - /* UDP packets (TYPE_IP */ - "450000396e0b40004011a0310a0901650a09170105da003500255489a60f01000001000000000000076f736d6f636f6d036f72670000010001", - "450000dc9eeb00004011aeae0a0917010a090165003505da00c83fbaa60f81800001000100030004076f736d6f636f6d036f72670000010001c00c00010001000079be0004904c2b4cc00c000200010000173d00130773756e6265616d08676e756d6f6e6b73c014c00c000200010000173d000603646e73c041c00c000200010000173d000a0767616e65736861c041c058000100010000173d0004d55f2e45c058001c00010000173d0010200107800045f0460000000000690001c06a0001000100006a710004d55f1b78c039000100010000173d000453ecb2cb", - "45000037652340004011a91b0a0901650a091701ef1b0035002376a2c3910100000100000000000006676f6f676c650264650000010001", - "0050b6162c10000db93a3ff908004500004726a6000038114083080808080a0901650035ef1b00338a8cc3918180000100010000000006676f6f676c650264650000010001c00c000100010000012b0004d83ad503", -}; - -/* Compress a packet using Van Jacobson RFC1144 header compression */ -static int compress(uint8_t *data_o, uint8_t *data_i, int len, - struct slcompress *comp) -{ - uint8_t *comp_ptr; /* Not used */ - int compr_len; - - /* Create a working copy of the incoming data */ - memcpy(data_o, data_i, len); - - /* Run compressor */ - compr_len = slhc_compress(comp, data_i, len, data_o, &comp_ptr, 0); - return compr_len; -} - -/* Expand a packet using Van Jacobson RFC1144 header compression */ -static int expand(uint8_t *data_o, uint8_t *data_i, int len, - struct slcompress *comp) -{ - int data_decompressed_len; - - /* Create a working copy of the incoming data */ - memcpy(data_o, data_i, len); - - /* Handle an uncompressed packet (learn header information */ - if ((data_i[0] & SL_TYPE_UNCOMPRESSED_TCP) == SL_TYPE_UNCOMPRESSED_TCP) { - data_o[0] &= 0x4F; - data_decompressed_len = slhc_remember(comp, data_o, len); - return data_decompressed_len; - } - - /* Uncompress compressed packets */ - else if (data_o[0] & SL_TYPE_COMPRESSED_TCP) { - data_decompressed_len = slhc_uncompress(comp, data_o, len); - return data_decompressed_len; - } - - /* Regular or unknown packets will not be touched */ - return len; -} - -/* Calculate IP Header checksum */ -static uint16_t calc_ip_csum(uint8_t *data, int len) -{ - int i; - uint32_t accumulator = 0; - uint16_t *pointer = (uint16_t *) data; - - for (i = len; i > 1; i -= 2) { - accumulator += *pointer; - pointer++; - } - - if (len % 2) - accumulator += *pointer; - - accumulator = (accumulator & 0xffff) + ((accumulator >> 16) & 0xffff); - accumulator += (accumulator >> 16) & 0xffff; - return (~accumulator); -} - -/* Calculate TCP/IP checksum */ -static uint16_t calc_tcpip_csum(const void *ctx, uint8_t *packet, int len) -{ - uint8_t *buf; - uint16_t csum; - - buf = talloc_zero_size(ctx, len); - memset(buf, 0, len); - memcpy(buf, packet + 12, 8); - buf[9] = packet[9]; - buf[11] = (len - 20) & 0xFF; - buf[10] = (len - 20) >> 8 & 0xFF; - memcpy(buf + 12, packet + 20, len - 20); - csum = calc_ip_csum(buf, len - 20 + 12); - talloc_free(buf); - return csum; -} - -/* Check TCP/IP packet */ -static void check_packet(const void *ctx, uint8_t *packet, int len) -{ - /* Check IP header */ - OSMO_ASSERT(len > 20); - OSMO_ASSERT(calc_ip_csum(packet, 20) == 0); - - printf("packet[9]=%02x\n", packet[9]); - - /* Check TCP packet */ - if (packet[9] != 0x06) - return; - OSMO_ASSERT(len > 40); - OSMO_ASSERT(calc_tcpip_csum(ctx, packet, len) == 0); -} - -/* Compress / Decompress packets */ -static void test_slhc(const void *ctx) -{ - char packet_ascii[2048]; - int i; - - struct slcompress *comp; - uint8_t packet[1024]; - int packet_len; - uint8_t packet_compr[1024]; - int packet_compr_len; - uint8_t packet_decompr[1024]; - int packet_decompr_len; - - printf("Allocating compression state...\n"); - comp = slhc_init(ctx, SLOTS, SLOTS); - OSMO_ASSERT(comp); - - for (i = 0; i < PACKETS_LEN; i++) { - printf("Testing with packet No. %d\n", i); - - /* Read input file */ - memset(packet_ascii, 0, sizeof(packet_ascii)); - memset(packet, 0, sizeof(packet)); - memset(packet_compr, 0, sizeof(packet_compr)); - memset(packet_decompr, 0, sizeof(packet_decompr)); - - OSMO_ASSERT(strlen(packets[i]) < sizeof(packet_ascii)); - strcpy(packet_ascii, packets[i]); - - packet_len = - osmo_hexparse(packet_ascii, packet, sizeof(packet)); - check_packet(ctx, packet, packet_len); - - /* Run compression/decompression algorithm */ - printf("Compressing...\n"); - packet_compr_len = - compress(packet_compr, packet, packet_len, comp); - printf("Decompressing...\n"); - packet_decompr_len = - expand(packet_decompr, packet_compr, packet_compr_len, - comp); - OSMO_ASSERT(packet_decompr_len == packet_len); - check_packet(ctx, packet_decompr, packet_decompr_len); - - /* Display results */ - printf("Results:\n"); - if (packet_compr_len > DISP_MAX_BYTES) - packet_compr_len = DISP_MAX_BYTES; - if (packet_len > DISP_MAX_BYTES) - packet_len = DISP_MAX_BYTES; - if (packet_decompr_len > DISP_MAX_BYTES) - packet_decompr_len = DISP_MAX_BYTES; - printf("Original Packet: (%i bytes) %s\n", packet_len, - osmo_hexdump_nospc(packet, packet_len)); - printf("DecompressedPacket: (%i bytes) %s\n", - packet_decompr_len, osmo_hexdump_nospc(packet_decompr, - packet_decompr_len)); - printf("CompressedPacket: (%i bytes) %s\n", packet_compr_len, - osmo_hexdump_nospc(packet_compr, packet_compr_len)); - slhc_o_status(comp); - slhc_o_status(comp); - - printf("\n"); - } - - printf("Freeing compression state...\n"); - slhc_free(comp); - printf("\n"); -} - -static struct log_info_cat gprs_categories[] = { - [DSNDCP] = { - .name = "DSNDCP", - .description = - "GPRS Sub-Network Dependent Control Protocol (SNDCP)", - .enabled = 1,.loglevel = LOGL_DEBUG, - }, - [DSLHC] = { - .name = "DSLHC", - .description = - "Van Jacobson RFC1144 TCP/IP header compression (SLHC)", - .enabled = 1,.loglevel = LOGL_DEBUG, - } -}; - -static struct log_info info = { - .cat = gprs_categories, - .num_cat = ARRAY_SIZE(gprs_categories), -}; - -int main(int argc, char **argv) -{ - void *ctx; - void *log_ctx; - - ctx = talloc_named_const(NULL, 0, "slhc_ctx"); - log_ctx = talloc_named_const(ctx, 0, "log"); - osmo_init_logging2(log_ctx, &info); - - test_slhc(ctx); - - printf("Done\n"); - - talloc_report_full(ctx, stderr); - talloc_free(log_ctx); - OSMO_ASSERT(talloc_total_blocks(ctx) == 1); - talloc_free(ctx); - return 0; -} - -/* stubs */ -struct osmo_prim_hdr; -int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx) -{ - abort(); -} diff --git a/tests/slhc/slhc_test.ok b/tests/slhc/slhc_test.ok deleted file mode 100644 index 71f48a17..00000000 --- a/tests/slhc/slhc_test.ok +++ /dev/null @@ -1,154 +0,0 @@ -Allocating compression state... -Testing with packet No. 0 -packet[9]=06 -Compressing... -Decompressing... -packet[9]=06 -Results: -Original Packet: (64 bytes) 4510004046dd40004006a9a7c0a8646ec0a864640017ad8b81980100f3ac984d801800e32a1600000101080a000647de06d1bf5efffd18fffd20fffd23fffd27 -DecompressedPacket: (64 bytes) 4510004046dd40004006a9a7c0a8646ec0a864640017ad8b81980100f3ac984d801800e32a1600000101080a000647de06d1bf5efffd18fffd20fffd23fffd27 -CompressedPacket: (64 bytes) 7510004046dd40004000a9a7c0a8646ec0a864640017ad8b81980100f3ac984d801800e32a1600000101080a000647de06d1bf5efffd18fffd20fffd23fffd27 - -Testing with packet No. 1 -packet[9]=06 -Compressing... -Decompressing... -packet[9]=06 -Results: -Original Packet: (91 bytes) 4510005b46de40004006a98bc0a8646ec0a864640017ad8b8198010cf3ac984d801800e3867500000101080a000647df06d1bf61fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0 -DecompressedPacket: (91 bytes) 4510005b46de40004006a98bc0a8646ec0a864640017ad8b8198010cf3ac984d801800e3867500000101080a000647df06d1bf61fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0 -CompressedPacket: (91 bytes) 7510005b46de40004000a98bc0a8646ec0a864640017ad8b8198010cf3ac984d801800e3867500000101080a000647df06d1bf61fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0 - -Testing with packet No. 2 -packet[9]=06 -Compressing... -Decompressing... -packet[9]=06 -Results: -Original Packet: (55 bytes) 4510003746df40004006a9aec0a8646ec0a864640017ad8b81980133f3ac989f801800e35fd700000101080a000647e106d1bf63fffd01 -DecompressedPacket: (55 bytes) 4510003746df40004006a9aec0a8646ec0a864640017ad8b81980133f3ac989f801800e35fd700000101080a000647e106d1bf63fffd01 -CompressedPacket: (55 bytes) 7510003746df40004000a9aec0a8646ec0a864640017ad8b81980133f3ac989f801800e35fd700000101080a000647e106d1bf63fffd01 - -Testing with packet No. 3 -packet[9]=06 -Compressing... -Decompressing... -packet[9]=06 -Results: -Original Packet: (55 bytes) 4510003746e040004006a9adc0a8646ec0a864640017ad8b81980136f3ac98a2801800e35fd200000101080a000647e106d1bf64fffb01 -DecompressedPacket: (55 bytes) 4510003746e040004006a9adc0a8646ec0a864640017ad8b81980136f3ac98a2801800e35fd200000101080a000647e106d1bf64fffb01 -CompressedPacket: (55 bytes) 7510003746e040004000a9adc0a8646ec0a864640017ad8b81980136f3ac98a2801800e35fd200000101080a000647e106d1bf64fffb01 - -Testing with packet No. 4 -packet[9]=06 -Compressing... -Decompressing... -packet[9]=06 -Results: -Original Packet: (100 bytes) 4510007446e140004006a96fc0a8646ec0a864640017ad8b81980139f3ac98a5801800e37b9b00000101080a000647e206d1bf640d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a57656c6c636f6d6520746f20706f6c6c75780d0a2d2d2d2d2d2d -DecompressedPacket: (100 bytes) 4510007446e140004006a96fc0a8646ec0a864640017ad8b81980139f3ac98a5801800e37b9b00000101080a000647e206d1bf640d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a57656c6c636f6d6520746f20706f6c6c75780d0a2d2d2d2d2d2d -CompressedPacket: (100 bytes) 7510007446e140004000a96fc0a8646ec0a864640017ad8b81980139f3ac98a5801800e37b9b00000101080a000647e206d1bf640d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a57656c6c636f6d6520746f20706f6c6c75780d0a2d2d2d2d2d2d - -Testing with packet No. 5 -packet[9]=06 -Compressing... -Decompressing... -packet[9]=06 -Results: -Original Packet: (66 bytes) 4510004246e240004006a9a0c0a8646ec0a864640017ad8b81980179f3ac98a5801800e3dab000000101080a000647ec06d1bf6f706f6c6c7578206c6f67696e3a20 -DecompressedPacket: (66 bytes) 4510004246e240004006a9a0c0a8646ec0a864640017ad8b81980179f3ac98a5801800e3dab000000101080a000647ec06d1bf6f706f6c6c7578206c6f67696e3a20 -CompressedPacket: (66 bytes) 7510004246e240004000a9a0c0a8646ec0a864640017ad8b81980179f3ac98a5801800e3dab000000101080a000647ec06d1bf6f706f6c6c7578206c6f67696e3a20 - -Testing with packet No. 6 -packet[9]=06 -Compressing... -Decompressing... -packet[9]=06 -Results: -Original Packet: (52 bytes) 4510003446dd40004006a9b3c0a8646ec0a864640017ad8b81980100f3ac984d501800e371410000fffd18fffd20fffd23fffd27 -DecompressedPacket: (52 bytes) 4510003446dd40004006a9b3c0a8646ec0a864640017ad8b81980100f3ac984d501800e371410000fffd18fffd20fffd23fffd27 -CompressedPacket: (52 bytes) 7510003446dd40004000a9b3c0a8646ec0a864640017ad8b81980100f3ac984d501800e371410000fffd18fffd20fffd23fffd27 - -Testing with packet No. 7 -packet[9]=06 -Compressing... -Decompressing... -packet[9]=06 -Results: -Original Packet: (79 bytes) 4510004f46de40004006a997c0a8646ec0a864640017ad8b8198010cf3ac984d501800e3cda40000fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0 -DecompressedPacket: (79 bytes) 4510004f46de40004006a997c0a8646ec0a864640017ad8b8198010cf3ac984d501800e3cda40000fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0 -CompressedPacket: (43 bytes) df00cda4fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0 - -Testing with packet No. 8 -packet[9]=06 -Compressing... -Decompressing... -packet[9]=06 -Results: -Original Packet: (43 bytes) 4510002b46df40004006a9bac0a8646ec0a864640017ad8b81980133f3ac989f501800e3a70a0000fffd01 -DecompressedPacket: (43 bytes) 4510002b46df40004006a9bac0a8646ec0a864640017ad8b81980133f3ac989f501800e3a70a0000fffd01 -CompressedPacket: (9 bytes) dc00a70a5227fffd01 - -Testing with packet No. 9 -packet[9]=06 -Compressing... -Decompressing... -packet[9]=06 -Results: -Original Packet: (43 bytes) 4510002b46e040004006a9b9c0a8646ec0a864640017ad8b81980136f3ac98a2501800e3a7060000fffb01 -DecompressedPacket: (43 bytes) 4510002b46e040004006a9b9c0a8646ec0a864640017ad8b81980136f3ac98a2501800e3a7060000fffb01 -CompressedPacket: (7 bytes) db00a706fffb01 - -Testing with packet No. 10 -packet[9]=06 -Compressing... -Decompressing... -packet[9]=06 -Results: -Original Packet: (100 bytes) 4510006846e140004006a97bc0a8646ec0a864640017ad8b81980139f3ac98a5501800e3c2d000000d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a57656c6c636f6d6520746f20706f6c6c75780d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d -DecompressedPacket: (100 bytes) 4510006846e140004006a97bc0a8646ec0a864640017ad8b81980139f3ac98a5501800e3c2d000000d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a57656c6c636f6d6520746f20706f6c6c75780d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d -CompressedPacket: (68 bytes) db00c2d00d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a57656c6c636f6d6520746f20706f6c6c75780d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a0d0a - -Testing with packet No. 11 -packet[9]=06 -Compressing... -Decompressing... -packet[9]=06 -Results: -Original Packet: (54 bytes) 4510003646e240004006a9acc0a8646ec0a864640017ad8b81980179f3ac98a5501800e321fb0000706f6c6c7578206c6f67696e3a20 -DecompressedPacket: (54 bytes) 4510003646e240004006a9acc0a8646ec0a864640017ad8b81980179f3ac98a5501800e321fb0000706f6c6c7578206c6f67696e3a20 -CompressedPacket: (18 bytes) df0021fb706f6c6c7578206c6f67696e3a20 - -Testing with packet No. 12 -packet[9]=11 -Compressing... -Decompressing... -packet[9]=11 -Results: -Original Packet: (57 bytes) 450000396e0b40004011a0310a0901650a09170105da003500255489a60f01000001000000000000076f736d6f636f6d036f72670000010001 -DecompressedPacket: (57 bytes) 450000396e0b40004011a0310a0901650a09170105da003500255489a60f01000001000000000000076f736d6f636f6d036f72670000010001 -CompressedPacket: (57 bytes) 450000396e0b40004011a0310a0901650a09170105da003500255489a60f01000001000000000000076f736d6f636f6d036f72670000010001 - -Testing with packet No. 13 -packet[9]=11 -Compressing... -Decompressing... -packet[9]=11 -Results: -Original Packet: (100 bytes) 450000dc9eeb00004011aeae0a0917010a090165003505da00c83fbaa60f81800001000100030004076f736d6f636f6d036f72670000010001c00c00010001000079be0004904c2b4cc00c000200010000173d00130773756e6265616d08676e756d6f6e -DecompressedPacket: (100 bytes) 450000dc9eeb00004011aeae0a0917010a090165003505da00c83fbaa60f81800001000100030004076f736d6f636f6d036f72670000010001c00c00010001000079be0004904c2b4cc00c000200010000173d00130773756e6265616d08676e756d6f6e -CompressedPacket: (100 bytes) 450000dc9eeb00004011aeae0a0917010a090165003505da00c83fbaa60f81800001000100030004076f736d6f636f6d036f72670000010001c00c00010001000079be0004904c2b4cc00c000200010000173d00130773756e6265616d08676e756d6f6e - -Testing with packet No. 14 -packet[9]=11 -Compressing... -Decompressing... -packet[9]=11 -Results: -Original Packet: (55 bytes) 45000037652340004011a91b0a0901650a091701ef1b0035002376a2c3910100000100000000000006676f6f676c650264650000010001 -DecompressedPacket: (55 bytes) 45000037652340004011a91b0a0901650a091701ef1b0035002376a2c3910100000100000000000006676f6f676c650264650000010001 -CompressedPacket: (55 bytes) 45000037652340004011a91b0a0901650a091701ef1b0035002376a2c3910100000100000000000006676f6f676c650264650000010001 - -Freeing compression state... - -Done diff --git a/tests/testsuite.at b/tests/testsuite.at index 637d853a..7eca0374 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -1,50 +1,4 @@ AT_INIT AT_BANNER([Regression tests.]) -AT_SETUP([gprs]) -AT_KEYWORDS([gprs]) -cat $abs_srcdir/gprs/gprs_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/gprs/gprs_test], [], [expout], [ignore]) -AT_CLEANUP - -AT_SETUP([sgsn]) -AT_KEYWORDS([sgsn]) -AT_CHECK([test "$enable_sgsn_test" != no || exit 77]) -cat $abs_srcdir/sgsn/sgsn_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/sgsn/sgsn_test], [], [expout], [ignore]) -AT_CLEANUP - -AT_SETUP([gtphub]) -AT_KEYWORDS([gtphub]) -AT_CHECK([test "$enable_gtphub_test" != no || exit 77]) -cat $abs_srcdir/gtphub/gtphub_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/gtphub/gtphub_test], [], [expout], [ignore]) -AT_CLEANUP - -AT_SETUP([xid]) -AT_KEYWORDS([xid]) -AT_CHECK([test "$enable_sgsn_test" != no || exit 77]) -cat $abs_srcdir/xid/xid_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/xid/xid_test], [], [expout], [ignore]) -AT_CLEANUP - -AT_SETUP([sndcp_xid]) -AT_KEYWORDS([sndcp_xid]) -AT_CHECK([test "$enable_sgsn_test" != no || exit 77]) -cat $abs_srcdir/sndcp_xid/sndcp_xid_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/sndcp_xid/sndcp_xid_test], [], [expout], [ignore]) -AT_CLEANUP - -AT_SETUP([slhc]) -AT_KEYWORDS([slhc]) -AT_CHECK([test "$enable_sgsn_test" != no || exit 77]) -cat $abs_srcdir/slhc/slhc_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/slhc/slhc_test], [], [expout], [ignore]) -AT_CLEANUP - -AT_SETUP([v42bis]) -AT_KEYWORDS([v42bis]) -AT_CHECK([test "$enable_sgsn_test" != no || exit 77]) -cat $abs_srcdir/v42bis/v42bis_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/v42bis/v42bis_test], [], [expout], [ignore]) -AT_CLEANUP +# osmo-gbproxy only has VTY tests so far diff --git a/tests/v42bis/Makefile.am b/tests/v42bis/Makefile.am deleted file mode 100644 index 74423927..00000000 --- a/tests/v42bis/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBCARES_CFLAGS) - -EXTRA_DIST = v42bis_test.ok - -noinst_PROGRAMS = v42bis_test - -v42bis_test_SOURCES = v42bis_test.c - -v42bis_test_LDADD = \ - $(top_builddir)/src/sgsn/v42bis.o \ - $(LIBOSMOCORE_LIBS) - - diff --git a/tests/v42bis/v42bis_test.c b/tests/v42bis/v42bis_test.c deleted file mode 100644 index e9c50692..00000000 --- a/tests/v42bis/v42bis_test.c +++ /dev/null @@ -1,438 +0,0 @@ -/* Test v42bis Compression/Decompression */ - -/* (C) 2016 by sysmocom s.f.m.c. GmbH - * All Rights Reserved - * - * Author: Philipp Maier - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include - -/* V.42bis compression parameters */ -#define P0 3 /* Direction */ -#define P1 512 /* Max number of codewords */ -#define P2 20 /* Max string length */ - -/* V.42bis compression buffer size - * (Does not affect the compression/decompression result) */ -#define MAX_BLOCK_SIZE 1024 - -/* Compressed sample packets, sniffed from real communication */ -#define COMPR_PACKETS_LEN 33 -char *compr_packets[] = { - /* K800i */ - "4500010268000700004006cefac0a80002550d93d740000050462c7ba7e4d1753a80184000aad500000101080a0001a670084dafb4474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d6978656433005ab97a052b960d59b368d5b2ddb3e60e9c372ef610b6dbf56bd8b165030f2e7cf88dd63b68f64c3d9b76ed1cb58847b490d122e8d0a24761185913d50e1aa423f0dc49036387d6d7b169e4d0cac68e1cd93b70f0804123f7eee03372dcc801038f193b306a68b5b2864d9a3b629a30b1a2b5081b35384613357a07c6133271d4e021a3064d52347182ee81b119c69c3a72d2b079b37e4409c177e6f4902163738cdd71f8a0a903d68ec21866e4c0918185087dfb329cec9831834d951a337c4a2e1174891c3badf5e8d113a38f1c336e24520c8a65751d1844d4c7696d852c1f240e992becf8918d0c9145465441939fcc6a1950a206b7e1fca38e1145eaebc129230aeb24f57bcab011c3c68829f5efe7bfcbe4c814e731668c3042f6fef93a62d9909561e4c91123c163d0085a3a4e1c3466c6c649ea048d519d5ff3a0f95ef4280c2471269e61633ee9193469de8845a3554d9fa74199c48622e7fa7dac30ac602f9af40a9ef0236a54268247cd7f923946d0a8d1c3c68d1e35788c5002e54ad0a00100", - "4500010268000900004006cef8c0a80002550d93d740000050462c7ba7e4d1753a801840007e7f00000101080a0001d1cc084db0ae474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d6978656433005ab97a052b960d59b368d5b2ddb3e60e9c372ef610b6dbf56bd8b165030f2e7cf88dd63b68f64c3d9b76ed1cb58847b490d122e8d0a24761185913d50e1aa423f0dc49036387d6d7b169e4d0cac68e1cd93b70f0804123f7eee03372dcc801038f193b306a68b5b2864d9a3b629a30b1a2b5081b35384613357a07c6133271d4e021a3064d52347182ee81b119c69c3a72d2b079b37e4409c177e6f4902163738cdd71f8a0a903d68ec21866e4c0918185087dfb329cec9831834d951a337c4a2e1174891c3badf5e8d113a38f1c336e24520c8a65751d1844d4c7696d852c1f240e992becf8918d0c9145465441939fcc6a1950a206b7e1fca38e1145eaebc129230aeb24f57bcab011c3c68829f5efe7bfcbe4c814e731668c3042f6fef93a62d9909561e4c91123c163d0085a3a4e1c3466c6c649ea048d519d5ff3a0f95ef4280c2471269e61633ee9193469de8845a3554d9fa74199c48622e7fa7dac30ac602f9af40a9ef0236a54268247cd7f923946d0a8d1c3c68d1e35788c5002e54ad0a00100", - "4500010268000b00004006cef6c0a80002550d93d740000050462c7ba7e4d1753b80193fff131c00000101080a00022884084dc558474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d6978656433005ab97a052b960d59b368d5b2ddb3e60e9c372ef610b6dbf56bd8b165030f2e7cf88dd63b68f64c3d9b76ed1cb58847b490d122e8d0a24761185913d50e1aa423f0dc49036387d6d7b169e4d0cac68e1cd93b70f0804123f7eee03372dcc801038f193b306a68b5b2864d9a3b629a30b1a2b5081b35384613357a07c6133271d4e021a3064d52347182ee81b119c69c3a72d2b079b37e4409c177e6f4902163738cdd71f8a0a903d68ec21866e4c0918185087dfb329cec9831834d951a337c4a2e1174891c3badf5e8d113a38f1c336e24520c8a65751d1844d4c7696d852c1f240e992be4e8918d8c9045465441939fcc6a1950a206b7e1dca38e1145eaebb929230aeb24f579cab011c3c68829f5efe7afcbe4c814e731668c3042f6fef93a62d9909561e4c91123c163d0084a3a4e1c3466c6c649ea048dd19c5ff3a0f95ef4280c2471269e61633ee9193469de8845a3554d9fa74199c48622c7fa7dac30ac5c2f9af40a1ef0236a502682478dff913946d0a8d1c3c68d1e35788c5002e54ad0a00100", - "4500010268000c00004006cef5c0a80002550d93d740000050462c7ba7e4d1753b80193fff65ab00000101080a0002d5f4084dc558474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d6978656433005ab97a052b960d59b368d5b2ddb3e60e9c372ef610b6dbf56bd8b165030f2e7cf88dd63b68f64c3d9b76ed1cb58847b490d122e8d0a24761185913d50e1aa423f0dc49036387d6d7b169e4d0cac68e1cd93b70f0804123f7eee03372dcc801038f193b306a68b5b2864d9a3b629a30b1a2b5081b35384613357a07c6133271d4e021a3064d52347182ee81b119c69c3a72d2b079b37e4409c177e6f4902163738cdd71f8a0a903d68ec21866e4c0918185087dfb329cec9831834d951a337c4a2e1174891c3badf5e8d113a38f1c336e24520c8a65751d1844d4c7696d852c1f240e992be4e8918d8c9045465441939fcc6a1950a206b7e1dca38e1145eaebb929230aeb24f579cab011c3c68829f5efe7afcbe4c814e731668c3042f6fef93a62d9909561e4c91123c163d0084a3a4e1c3466c6c649ea048dd19c5ff3a0f95ef4280c2471269e61633ee9193469de8845a3554d9fa74199c48622c7fa7dac30ac5c2f9af40a1ef0236a502682478dff913946d0a8d1c3c68d1e35788c5002e54ad0a00100", - "450001022d000f00004006ac5ec0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e33005cbd8215bb67cd1d386f5cecd1cb766ad5ab59b7decdbbb7ef1ba877d0ec49daf56bd83960fd8e6821a3c5cd9c3b7bc230b2e6a81d343e47e0b99306c60ea8a54fd3c801958d1d39a877e0e00183c6ebd8b767e4b89103061e337660d4806a650d9b3477c4346162056a11366a7064d6c9f30e8c2764e2a8c143460d9a9f68e2dcdc0323328c3975e4a461f326fc881278efcce9214346e418b1e3f04153c7aa9dfd31ccc88123030b11f5ec6538d93163069b2a3566d0445ce2e612397646d398118347cd9a3a68f49848f12696d0756010011f67b415ad7c90fc17be5f224536322e16195105cd7b32a16540397adb06718a3a461459afe7a58c28a293acb729c3460c1b23a6ac6ffffe2d93235388c79831c288d6f6ddeb6065a355869127478cdcae79b3739c3868cc648df3d3091a9e31abe641537d674f1848e2203cc386fbcf3368d2bcc18a06aa9a3e456fde0c00", - "450001022d001000004006ac5dc0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e33005cbd8215bb67cd1d386f5cecd1cb766ad5ab59b7decdbbb7ef1ba877d0ec49daf56bd83960fd8e6821a3c5cd9c3b7bc230b2e6a81d343e47e0b99306c60ea8a54fd3c801958d1d39a877e0e00183c6ebd8b767e4b89103061e337660d4806a650d9b3477c4346162056a11366a7064d6c9f30e8c2764e2a8c143460d9a9f68e2dcdc0323328c3975e4a461f326fc881278efcce9214346e418b1e3f04153c7aa9dfd31ccc88123030b11f5ec6538d93163069b2a3566d0445ce2e612397646d398118347cd9a3a68f49848f12696d0756010011f67b415ad7c90fc17be5f224536322e16195105cd7b32a16540397adb06718a3a461459afe7a58c28a293acb729c3460c1b23a6ac6ffffe2d93235388c79831c288d6f6ddeb6065a355869127478cdcae79b3739c3868cc648df3d3091a9e31abe641537d674f1848e2203cc386fbcf3368d2bcc18a06aa9a3e456fde0c00", - "450001022d001100004006ac5cc0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e33005cbd8215bb67cd1d386f5cecd1cb766ad5ab59b7decdbbb7ef1ba877d0ec49daf56bd83960fd8e6821a3c5cd9c3b7bc230b2e6a81d343e47e0b99306c60ea8a54fd3c801958d1d39a877e0e00183c6ebd8b767e4b89103061e337660d4806a650d9b3477c4346162056a11366a7064d6c9f30e8c2764e2a8c143460d9a9f68e2dcdc0323328c3975e4a461f326fc881278efcce9214346e418b1e3f04153c7aa9dfd31ccc88123030b11f5ec6538d93163069b2a3566d0445ce2e612397646d398118347cd9a3a68f49848f12696d0756010011f67b415ad7c90fc17be5f224536322e16195105cd7b32a16540397adb06718a3a461459afe7a58c28a293acb729c3460c1b23a6ac6ffffe2d93235388c79831c288d6f6ddeb6065a355869127478cdcae79b3739c3868cc648df3d3091a9e31abe641537d674f1848e2203cc386fbcf3368d2bcc18a06aa9a3e456fde0c00", - "450001022d001200004006ac5bc0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e33005cbd8215bb67cd1d386f5cecd1cb766ad5ab59b7decdbbb7ef1ba877d0ec49daf56bd83960fd8e6821a3c5cd9c3b7bc230b2e6a81d343e47e0b99306c60ea8a54fd3c801958d1d39a877e0e00183c6ebd8b767e4b89103061e337660d4806a650d9b3477c4346162056a11366a7064d6c9f30e8c2764e2a8c143460d9a9f68e2dcdc0323328c3975e4a461f326fc881278efcce9214346e418b1e3f04153c7aa9dfd31ccc88123030b11f5ec6538d93163069b2a3566d0445ce2e612397646d398118347cd9a3a68f49848f12696d0756010011f67b415ad7c90fc17be5f224536322e16195105cd7b32a16540397adb06718a3a461459afe7a58c28a293acb729c3460c1b23a6ac6ffffe2d93235388c79831c288d6f6ddeb6065a355869127478cdcae79b3739c3868cc648df3d3091a9e31abe641537d674f1848e2203cc386fbcf3368d2bcc18a06aa9a3e456fde0c00", - "4500010268001300004006ceeec0a80002550d93d740000050462c7ba7e4d1753b80193fff7b4a00000101080a0003c054084dc558474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d6978656433005bbb7e0d3b964dd9b369d7b6ddb3e60e9c372ef614beeb15ac58b2660513368cf8cdd63b68f65045ab96ed9cb58947b490d1422851a34861185923d50e9aa423f0dc490363c756d8b269e4d8cac68e9cd93b70f0804143376fe13372dcc801038f193b306a6cb5b2864d9a3b629a30b1b2b5081b353848173d7a07c6133271d4e021a3068d52347184ee81c119c69c3a72d2b079c37e4489c177e6f4902183730cde71f8a0a913d6cec21866e4c091818548fdfb329cec9831834d951a337e4e2e2174891c3baef5e8d113a38f1c336e2656148a85751d1844d6c7716da52c1f240f9b2fecf8918d0c9145465441a39f0c6b1950a40ab7f1fca38e1145ecebc129234aeb24f67bcab011c3c68829f6f1ebb7cbe4c894e731668c3052163ffa3a63d9949561e4c91123c263d0105a3a4e1c3466c8c651ea04cd519d60f3a0016f14290c2471289e61735ee9193469de8c45b3554d1fa84299c88622e73afeac30ac6037aaf40a9ef0236a54268247cd7f923946d0a8d1c3c68d1e35788c5002e58a50a10100", - "450001022d001400004006ac59c0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e33005cbd8215bb67cd1d386f5cecd1cb766ad5ab59b7decdbbb7ef1ba877d0ec49daf56bd83960fd8e6821a3c5cd9c3b7bc230b2e6a81d343e47e0b99306c60ea8a54fd3c801958d1d39a877e0e00183c6ebd8b767e4b89103061e337660d4806a650d9b3477c4346162056a11366a7064d6c9f30e8c2764e2a8c143460d9a9f68e2dcdc0323328c3975e4a461f326fc881278efcce9214346e418b1e3f04153c7aa9dfd31ccc88123030b11f5ec6538d93163069b2a3566d0445ce2e612397646d398118347cd9a3a68f49848f12696d0756010011f67b415ad7c90fc17be5f224536322e16195105cd7b32a16540397adb06718a3a461459afe7a58c28a293acb729c3460c1b23a6ac6ffffe2d93235388c79831c288d6f6ddeb6065a355869127478cdcae79b3739c3868cc648df3d3091a9e31abe641537d674f1848e2203cc386fbcf3368d2bcc18a06aa9a3e456fde0c00", - "450001022d001500004006ac58c0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e33005cbd8215bb67cd1d386f5cecd1cb766ad5ab59b7decdbbb7ef1ba877d0ec49daf56bd83960fd8e6821a3c5cd9c3b7bc230b2e6a81d343e47e0b99306c60ea8a54fd3c801958d1d39a877e0e00183c6ebd8b767e4b89103061e337660d4806a650d9b3477c4346162056a11366a7064d6c9f30e8c2764e2a8c143460d9a9f68e2dcdc0323328c3975e4a461f326fc881278efcce9214346e418b1e3f04153c7aa9dfd31ccc88123030b11f5ec6538d93163069b2a3566d0445ce2e612397646d398118347cd9a3a68f49848f12696d0756010011f67b415ad7c90fc17be5f224536322e16195105cd7b32a16540397adb06718a3a461459afe7a58c28a293acb729c3460c1b23a6ac6ffffe2d93235388c79831c288d6f6ddeb6065a355869127478cdcae79b3739c3868cc648df3d3091a9e31abe641537d674f1848e2203cc386fbcf3368d2bcc18a06aa9a3e456fde0c00", - "4500010239000500004006ac5cc0a800020a0901ab40001f90c286afa741a348cb801840007fcb0000050a41a348dc41a34a440000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d69786564330057b36eedfa954dd8b165cfa6ddb3e60e9c372ef6049eab95ab57b062fd02164cf8cdd53b68f640256b16ed9cb38547b490d1e22791a043efc030b2c6a91d344547e0b99306c68eabad5fd3c871958d1d39b077e0e00183c6eddcbf67e4b89103061e337660d4b86a650d9b3477c4346162e56a11366a7080164d14c6133271d4e021a3068d5134717eee818119c69c3a72d2b079837e4489bf77e6f4902103738cdc71f8a0a9d3d58ec11866e4c091818548fcf9329cec9831834d951a33783e2ef173891c3bab69cc88c1a3674f1d347a6cdcf8134bea3a30889c8fb3da4a583e48162a37a891231b19208b8ca882c63e99d432a038fd6d8339471d238ac8d793534614d549e40b956123868d1153e4d3b77f97c99129cc63cc1861242c7df275beb2092bc3c89323467ef7fc693a4e1c3466c0c631ea04cdd09d5cf3a0e96e66e81d1848e2403cc366bcd13368d2bcf98ae6aa9a3e4c7ffe0c00", - "450001025b000a00004006ac35c0a800020a0901ab40011f90c293b0a8af5e58be5018400072a60000474554202f72656470686f6e652e706e6720485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c33005cbd82154b368e59b46ad9ee597307ce1b177b066fedfa35ec583665010b266cf8cdd63b68f6543d9b76ed1cb58747b490d16268d1a34961185933d50e1aa523f0dc490363c7d6d7b169e4d8cac68e1cd93b70f0804123f7eee03372dcc801038f193b306a6cb5b2864d9a3b629a30b1b2b5081b3538461b457a07c6133238f190518366299a3843f7c0d80c634e1d3969d8bc513fa244e03b737ac890b139c6ee387cd0d4096b07610c3372e0c8c042647e7d194e76cc98c1a64a8d1940259718ba448e9dd63466c4e01134a80e1a3d38721c8a65751d1844d2c7696d65261f240d9923dcd8918d0c9045465441839fcc6a1950a606b7e1bca38e1145e8ebd929230aeb24f485cab011c3c68829f4ede3d7cbe4c814e731668c3032d3be1a3c75c6b2296be4c91123c1830e451d270e1a3364e32c758206694fb079d07c3f9a1406923812cfb0c1b9f40c9a346fc6a2d9aaa64fd4a175d33064b894bfff812b5bc2a421b3e60c8e32860e0d00", - "4500010267001200004006ac21c0a800020a0901ab40011f90c293b0a8af5e58be80184000ee770000050aaf5e6437af5e8c230000474554202f72656470686f6e652e706e6720485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d33006fc8de41b3c72b5cb974e7cc853ca2858c164c9d42950ac3c81aae76d04c1d81e74e1a183bc8e2d64d2307593676e4ecde8183070c1ac2892b9f91e3460e1878ccd8815183ac95356cd2dc11d3848915b245d8a8c1c1fa69d43b309e90098a878c1a3454d1c461ba0706691873eac849c3e6cdfc112514df99d343860cd23188c7e183a68e5a3b126398910347061622fcfdcb70b263c60c36556acc48bab904d32572ecd8a63123060fa54a75d0e861d224532cb4ebc020223f8e6d2b3cf920b1585d62c9936c64a82c32a20a9a826468cb80c255b98deb27758c28d25f4f5119516a27e9df54868d1836464ce9ffbf20612647a65c8f316384119effd5e0a9c3968d5b234f8e1851ae94a9ec3871d098691b87aa1334518fa6cd83063d54a93090c4d978864d50aa67d0a479c3160d59357db432fd9ba66245aa0a193aac7953278d9e3f679894c1946900", - "4500010236003000004006cf03c0a80002550d93d740020050c30e84a9441d06ac80184000c2f400000101080a00052df410fc31bd474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d6978656433005cbd82154b968d59b46ad9baddb3e60e9c372ef618c6fb35ecd8b26707173e9cf80dd73b68f6544dbbb6ed1cb68a47b490d16268d1a34961185933d50e1aa523f0dc49036307d7d8b369e4e0cac68e1cda3b70f080416377efe13372dcc801038f193b306a70b5b2864d9a3b629a30b1c2b5081b35384a1b457a07c6133271d4e021a306cd52347186ee81d119c69c3a72d2b079d37e4409c277e6f49021a3738cde71f8a0a923d60ec31866e4c0918185887dfc329cec9831834d951a3380522e3174891c3baff5e8d113a38f1c336e285a1c8aa5751d1844d8c7796dc52c1f24109d33f408928d8c9145465441b39f4c6b1950a60eb7011da48e1145eeebc929238aeb24f77dcab011c3c68829f7f3efbfcbe4c814e831668c3062367ffa3a64d9989561e4c91123c363d0186a3a4e1c3466cac659ea040dd29d61f3a0097f34290c24712a9e61837ee9193469de9045c3554d9fa843870600", - "4500010260004500004006cec4c0a80002550d93d740030050c3134faac89c8b2980184000578d00000101080a000535c010fc34c8474554202f6e697276616e612e63737320485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d33006fcede41b3072c5dbb78e7dcad3ca2858c164ea14aa50ac3c81aaf76d0541d81e74e1a183bcef2f64d23c7593676e4fcde8183070c1ac6913b9f91e3460e187884c2a871d6ca1a3669ee8869c2c4cad9226cd4e0801d75ea1d184f7caac143460d1aab68e238dd0303358c3975e4a461f3c6fe88128fefcce9214306ea18c8e3f04153a7edd0b841e5c0918185c87f83329cec9831834d951a33967e2ee174891c3bbaf5e8d113a38f1c336e3ac2718a05771d1844eac7d16d252e1f241985563489928d8c954546544193900c6e1950bc3ab7a11da58e11450aea292a234aee240595cab011c3c68829050f2624cce4c814ed31668c3012f7a0fc3a6fd9c49561e4c91123ce63d0702a3b4e1c3466e0c6b1ea04cdd4a36cf3a0592f952a0c2471ccc839c3268e1aab67d0a479f316cd59357db83af59b062346ab0d1f46b47933e7ce9e329c3a0d00", - "4500010264004600004006cebfc0a80002550d93d740040050c3135bab2189da61801840008f2d00000101080a000535c410fc34dc474554202f382d4269742f4c6162656c2e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d3300952fbf517b07cd1e9f77f3ee9da317f38816325a48a56a152b0c236bc4da419375049e3b6960ec50fb3b388d1c6ad9d891237c070e1e3068245f1e7d468e1b3960e0316307460db556d6b04973474c132656d4f254836376d5ab7760008da3060f193568b4a28923750f8cd530e6d4919386cd9bfc234a48be33a7870c19ab632c8fc3074d1db87630c63023078e0c2c440c2294e164c78c196caad498f1547409a94be4d8e9ad478f9e187de498710352a4542cbbebc020823f4e6f2b74f920e1c81da34a966c64bc2c32a20a1a866476cb802236ba0def2c758c2872500f521951782739d854868d1836464c39a89061612647a6788f31638411ba0aebd791cb86ae0c234f8e18891e838654da71e2a03133378e562768ae2a7d9b078d7bab5861208913f20c1bfa5acfa049f3462e1ab56afa80950a38cdc68d5a214aa4a873e74fa144474a951a00", - "4500010264005800004006ceadc0a80002550d93d740050050c31389acaf7b26538018400075c900000101080a000537d010fc354a474554202f382d4269742f41636f726e2e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d3300942dbf497b07cd1e9f76f1ea9d93f7f28816325a48a56af50e0c236bc2da418375049e3b6960ec48eb1b388d1c69d9d891137c070e1e306820570e7d468e1b3960e0316307468db456d6b04973474c132656d2f2548343b699aa57613c2113470d1e326ad064451347ea1e18aa61cca923270d9b37f94794887c674e0f193254c7501e870f9a3a6fed608c11148e0c2c440c2294e164c78c196caad498f1347409a94be4d8e1ad478f9e187de4987103520e1ca95874d78141047f1cde56e6f241c2713bc6942bd9c87059644415340cc9e89601252c741bdd57ea1851e4a09ea432a2ec4e72d0a90c1b316c8c9872502143c34c8e4ce91e63c608237315d6af1397cd5c19469e1c31023d060da9b4e3c44163466e9cac4ed0585dea360f9af6efefc0401227e81936f4b39e4193e64d5c3469d5f4f92a15709a8d1bb342944831a7ce9e42898a942a3500", - "4500010266007600004006ce8dc0a80002550d93d740060050c31431ada11fa06780184000f08e00000101080a00053b3c10fc35ef474554202f382d4269742f416d73747261642e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d33009733bf597b07cd9e9e78f5f2d5a379440b192da656bd9a1586913563eda0d13a02cf9d343076ac052e9c468eb56cecc819be03070f18349433973e23c78d1c30f098b103a3c65a2b6bd8a4b923a609132b6b77aac141db2ad63b309e9089a3060f193568b6a28933750f0cc830e6d4919386cd9bfd234a50be33a7870c199063308fc3074d9db87636c63023078e0c2c44103294e164c78c196caad49801957489a94be404ddaa478f9e187de4987133b2e4542cbcebc020a23f8e6f2b75f920f9d87d63cb976c64c82c32a20a9a876478cb803256ba8def2f758c28a2500f5319517a27512855868d1836464c51d8f061622647a67c8f31638491ba0defd799cba6ae0c234f8e18911e83c6d4db71e2a0314337ce562768b03a859b07cdfbab5961208943f20c1bfb5bcfa049f3662e9ab56afa849d3a388d478f5b2756bcf813e850a3484d4e9d1a00", - "4500010264007700004006ce8ec0a80002550d93d740040050c3135ddb2189e0108018400060d600000101080a00053b4010fc35e7474554202f382d4269742f41746172692e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d3300932bbf497b07cd1e9f76f1ea9d93d7f28816325a48a56a152b0c236b84da419375049e3b6960ec48dbfb378d1c69d9d891037c070e1e30681c4ffe7c468e1b3960e0316307468db456d6b04973474c132656d2f254832376d5ab77603c2113470d1e326ad068451347ea1e18a961cca923270d9b37f84794807c674e0f193252c7481e870f9aa1da2fc63023078e0c2c440a1e94e164c78c196caad498f1147409a94be4d8d9ad478f9e187de49871e311a4542cb9ebc020723fce6e2b73f920d968e7224a956c64b42c32a20a9a856472cb8022f4b90dee2a758c286250cf511951742731c854868d1836464c31887061612647a6708f31638491b908e9d789cb66ae0c234f8e18791e8386d4d971e2a03123378e562768ae26759b070d7bab58612089f3f10c9bf95acfa049f3262e9ab46afa8095fa378d468d5a1f469c8833e7ce9f41434a951a00", - "4500010264007c00004006ce89c0a80002550d93d740070050c314f3aefa37ceb18018400009f900000101080a00053e3410fc369e474554202f382d4269742f4170706c652e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d3300942dbf517b07cd1e9f76f1ea9d93f7f28816325a48a56a152b0c236bc4da419375049e3b6960ec50dbfb378d1c6ad9d891037c070e1e30681c4ffe7c468e1b3960e0316307460db556d6b04973474c132656d4f254832376d5ab77603c2113470d1e326ad068451347ea1e18a961cca923270d9ba15a4b44be33a7870c19a963248fc3074d9db7762cc63023078e0c2c400da691e164c78c196caad498f1147409a94be4d8d9ad478f9e187de49871e311a4542cb9ebc020723fce6e2b73f920d1a8dd224a956c64b42c32a20a9aa16472cb8022f6b90dee2a758c2862504f521951742731e854868d1836464c29a910cd602647a6708f31638491b908e9d789cb66ae0c234f8e18791e8386d4d971e2a03123378e562768ae2e7dc3260f1af656b1c24012e7e31936f3b59e4193e64d5c346ad5f4012bd56f9a8c19b53a84281167ce9d3f8b86942a3500", - "4500010265007d00004006ce87c0a80002550d93d740050050c3138bdcaf7b296780183cec0de600000101080a00053e3410fc368e474554202f382d4269742f447261676f6e2e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d33009631bf597b07cd1e9f8df5f2d59379440b192da656bd9a1586913563eda0d13a02cf9d343076ac052e9c468eb56cecc819be03070f18349433973e23c78d1c30f098b103a3c65a2b6bd8a4b923a609132b6b79aac141db2ad63b309e9089a3068f50345bd1c499ba07c6631873eac849c3e68dfe112526df99d343868cc73198c7e183a64e5c3b1963989103470616220715ca70b263c60c36556acc804abac4d42572ecf8d6a3474f8c3e72ccb80939722a16de75601051c3dfb715a27c9074ec9e71654b363260161951054d4332bc6540192bddc6f7963a461441a847a98c28bd93208ce3d3460c1b23a6205cd89030932353bec79831c208d185f7ebcc6553d7c8932346a4c7a03175769c3868ccd08db3d5091aac4ce1e641f3fe6a561848e2883cc3c6fed63368d2bc998b66ad9a3e61a7fe4dc391e3d688132beeec0974a8519253a70600", - "4500010269008000004006ce80c0a80002550d93d740060050c3143301dfa11fa3de80183c892b5d00000101080a0005412c10fc3761474554202f382d4269742f456e74657270726973652e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f6600952f67defcc66dd03d3df7f6fd3bc72fe7112d64b4b08a552b571846d6983dda75049e3b6960ec701b7c388d1c6e8dca21be03070f183496db694e63468e1b3960e0316307460db756d6b04973474c132656dcee5483c376d6ad77603c2113470d1e326ad0784513c7ea1e18ae6110959386cd1bfe234a58be33a7870c19ae63548fc347285d3b1b63989103470616220ad3c870b263c60c36556acc986aba84d52572ecfcd6a3474f8c3e72ccb81149d22a96a3756010d91fe7b715bc7c90d4f9b891a54b36326216195105cd4332476540312bdd0678973a4614a923478f531951d0dc49d299aa0c1b316c8c98d2b9e143c64c8e4c011f63c60823781be2af63970d5e19469e1c31223d060dabbce3c44163e66e1caf4ed06c853a370f1af85ab9c2401267e41936f7bd9e4193e68d5d346ed5f4216bd5701aa142bd4eac78d1e7cfa1489596b46a3500", - "4500010268008100004006ce80c0a80002550d93d740040050c313600b2189e30280183d0e896b00000101080a000541d810fc379d474554202f382d4269742f436f6d6d6f646f72652e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f3300952f67defcc6ed1d347b7ceeedfb778e5fce235ac8686115ab56ae308cac316b074dd71178eea481b1c3edf0e23472b86563478ef11d3878c0a0d1fc79f519396ee48081c78c1d1835dc5a59c326cd1d314d985871cb530d8edb59b7de81f1844c1c3578c8a841e3154d1cab7b60bc8631a78e9c346cdef81f51c2f29d393d64c8781de3791c3e68ead0b5d3318699a032b01061e85086931d3366b0a95263c654d325ac2e916327b81e3d7a62f49163c64dc9a056b1fcae038348ff38c1ade0e5832424f88e2e61b29131b3c8882a682292f92d038ad9ea36c4c3d431a248433d4c6544019ea46154193662d81831a5e1c38889991c99223ec68c1146f03ed45fc72e1bbc328c3c3962a47a0c1a5671c78983c6ccdd385e9da0d9ea746e1e34f2b5728581248ec9336cf27b3d8326cd1bbb68dcaae943d62ae13420417aad78312350a1448d228523c3aad500", - "4500010263008200004006ce84c0a80002550d93d740050050c3138e0daf7b2cf180183962cb2f00000101080a000542b410fc3822474554202f382d4269742f454143412e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b330096dfa4bd83668f4fbb78f5cec97b79440b192da24ead7a1586913561eda0c13a02cf9d343076a4f50d9c468eb46cecc809be03070f1834902b873e23c78d1c30f098b103a3465a2b6bd8a4b923a609132b6979aac1219baad53b309e9089a3060f193568b2a28913750f0cd530e6d4919386cd9bfc234a44be33a7870c19aa63288fc3074d9db77630c63023078e0c2c440c2294e164c78c196caad498e1347489a84be4d8e1ad478f9e187de49871035264542cbaebc020823f0e6f2b73f920e1b81da34a966c64bc2c32a20a1a866474cb801216ba8dee2c758c287250cf511951762739c854868d1836464c39a89021612647a6748f31638491b90aebd789cb66ae0c234f8e18811e8346d4d971e2a03123374e562768ac26759b074dfbaa5761208913f20c1bfa59cfa049f3262e9ab46afa7c8dfa37cdc68d59214aa4a873e7cfa04347468d1a00", - "4500010262008500004006ce82c0a80002550d93d740070050c314f5defa37d29b80183c168b6100000101080a000542c810fc37e5474554202f382d4269742f4d53582e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b330095dfa0bd83668fcfba77f3cec16b79440b192da04aa56a1586913560eda0b93a02cf9d343076a0edfd9b460eb46cecc801be03070f18348e277f3e23c78d1c30f098b103a3065a2b6bd8a4b923a609132b6879aac1117b6ad53b309e9089a3060f193568b0a28903750f8cd430e6d4919386cd1bfc234a40be33a7870c19a963248fc3074d1db7762ec63023078e0c2c440a1e94e164c78c196caad498d1147409a84be4d8d9ad478f9e187de49871f33124542cb9ebc020723fce6e2b72f920d9a8fd62ca956c64b82c32a20a9a856472cb8002f6b90dee2b758c2862508f511951742731b854868d1836464c318870e1602647a6708f31638411b908e9d781cb46ae0c234f8e18791e830654d971e2a03113370e562768aa226d9b070d7baa5661208903f20c9bf958cfa049f3062e1ab46afa7885ea378d468d581f469c9853674fa0424542851a00", - "4500010265009400004006ce70c0a80002550d93d740060050c3143614a11fa986801836e1f43c00000101080a000545b010fc38b7474554202f382d4269742f4d617474656c2e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d3300942dbf512b744fcfbb79f7ced17b79440b192da452b58a1586913562eda0c93a02cf9d343076a8edfd9b460eb56cecc801be03070f18348e277f3e23c78d1c30f098b103a3865a2b6bd8a4b923a609132b6a77aac111bbead53b309e9089a3060f193568b4a28923750f8cd430e6d4919386cd1bfc234a44be33a7870c19a963248fc3074d1db87630c63023078e0c2c440a1e94e164c78c196caad498f1347409a94be4d8d9ad478f9e187de498710352a4542cb9ebc020723fce6e2b74f920e1a81da34a966c64bc2c32a20a1a866472cb8022f6b90dee2c758c2862504f521951742731e854868d1836464c31889021612647a6708f31638411ba08e9d791bbd8c89323469ec7a02195769c3868cc7ca5abd5099aab4bdfe641c3de2a561848e2843cc366bed63368d2bc018a46ad9a3e60a5fe4db371a356881229eae4f97368d19152a50600", - "4500010263009900004006ce6dc0a80002550d93d740040050c313623f2189e66b801839a5739a00000101080a0005464c10fc38f3474554202f382d4269742f4f7269632e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b330095dfa4bd83668f4fc578f5eab13ca2858c1651a756bd0ac3c89ab076d0601d81e74e1a183bd2fa064e23475a3676e404df8183070c1ac895439f91e3460e1878ccd8815123ad95356cd2dc11d3848995b43cd5e0904dd5ea1d184fc8c45183878c1a3459d1c489ba0706631873eac849c3e64dfe112520df99d343860cc63194c7e18326e8768c31ccc88123030b1183086538d93163069b2a356638155d22ea12397678ebd1a327461f3966dc7c0c19158bee3a3088e08fc3db8a5c3e4838dac19872251b192e8b8ca882862119dd32a084856ea3fb4a1d238a1cd483544694dd490e36956123868d11530e2a642898c99129dd63cc186144aec2fa75e0b2912bc3c8932346a0c7a01135769c3868ccc48d93d5091aab4adde641d3beea551848e2803cc3867ed63368d2bc818b26ad9a3e5fa3f64db3716356881229e6d4d91328519151a30600", - "4500010269009e00004006ce62c0a80002550d93d740060050c3143845a11fab60801840003c1c00000101080a000547d810fc38b7474554202f382d4269742f526164696f536861636b2e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f330096316be6fcc6ed1d347b7a46f60b584fe7112d64b4b08a552b5718468ad6b183a6eb083c77d2c0d8e17678711a39dcb2b123c7f80e1c3c60d068febcfa8c1c3772c0c063c60e8c1a6e89b24973474c132656dcee5483e376d6ad77603c2113470d1e326ad0784513c7ea1e189361cca923270d9b37fd4794b87c674e0f193226c7781e870f9a3a74ed748c61460e1c195888307428c3c98e1933d854a93163eae9125697c8b1135c8f1e3d31fac831e3a6e449ab587ed78141847f9ce056f0f24112127cc79731d9c8a0596444153411c9fc9601c56c751be263ea1851a4a19ea732a2004fd2b0aa0c1b316c8c98d2f061c4c54c8e4c111f63c60823781fe6af6357685e234f8e18a91e838655dd71e2a03173378e572768b6469d9b074d7cad5c61208963f20c1bfc5ecfa049f3c62e1ab76afa90b55a380d48905e2b5ecc1874e8d1a44b515ab51a00", - "4500010266009f00004006ce64c0a80002550d93d740050050c313903caf7b2f9580183d5ce4ef00000101080a0005481810fc3934474554202f382d4269742f5068696c6970732e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d3300952fbf597b07cd1e9f8cf5f2d58379440b192da85ac5aa1586913563eda0d93a02cf9d343076acfd1d9c468eb56cecc811be03070f1834922f8f3e23c78d1c30f098b103a3c65a2b41d3dc11d3848995b53cd5e0987d35eb1d184fc8c45183878c1a345cd1c4a1ba0786631873eac8492334ff881292efcce9214386e318cbe3f0415307b19d8b31ccc88123030b1183086538d93163069b2a3566441d5d82ea1239767aebd1a327461f3966dc7c0c4915cbee3a3088e08fd3db0a5d3e483672bf9872251b192e8b8ca882e60d1a32bb6540191bdd86f7953a461439a847a98c28bc931c7c2ac3460c1b23a61c5428f830932353bcc79831c2085d85f5ebc8654357869127478c448f4183eaed3871d098991b87ab133459990ecd83a63d56ad3090c40179860d7dae67d0a4792317cd5a357d8852059c46a346ae0f234ecca9b32750a322a9520d00", - "450001049b00ae00004006cc20c0a80002550d93d740050050c31396ceaf7b396e801840009ad400000101080a0005611010fc3d6b474554202f382d4269742f6d72776f6e672e67696620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d33009733bf617b07cd9e9f8ef7f6d5a379440b192da85ac5aa1586913564eda0d93a02cf9d343076b00d3e9c460eb66cecc821be03070f183496379f3e23c78d1c30f098b103a3065b2b6b92de11d3848915b63dd5e0a87d35eb1d184fc814c543460d1aae68e250dd0303328c3975e4a461f346ff881294efcce9214306e418cde3f0415347ae1d8c31ccc88123030b1183086538d93163069b2a3566442d5d82ea1239767eebd1a327461f3966dc801449154bef3a3088e48ff3db0a513e48387ac7a892251b192f8b8ca882862199de32a0909d6e033c4b1d238a1cd4a3544614df490e3e956123868d11530e2a644898c99129e063cc186184a8423578ead06563d7c8932346a6c7a04175769c3868ccd48dc3d5099aac4ce3e641f31eab561848e2843cc3a628d73368d2bca18b86ad9a3e62a9fe4db3712357881229eadce933e8d09154a92a417265848c1d307afec489074e198678e6108d31a7e8882557ae4c9111357903abdf7f7b052b96ec4f3868d51e7e1b77ae74198ef7f63d1a76ce52bf50cf4c9d7355b7ddb290634cae7cb9b4dec05f135b76c178c41d347b7e16eeabc732db16325a74cf7a07869135647bff0e3e7c075bdad3732c6f4e7c070e1ed37dcb993e23c78d1c30f07807cfd6ca1a3669ee8869c2c40adb9e6a70a8d60ae30999a278c8e4e78a260ed53d3020c33088900d43ae25204aa46818239f8d6cbc631c3a120b11ff6964a864c9e6e58ca8a54b505d220727579d3b7d06bd48158b52a6f99f72b542940f923a13ed600c39838d8c974546fc6548a63761b2d36d8067a96344913a72f428951105cd9d248a9fcab011c3c688298ad30c444398c99129e063cc18313bce683578eae8b66be4c91123d363246f003b0e1a33d2b93a41939569dc3c68d6df8181248e193967d814e57a064d9a3774d1b055d387cd1caa7fd36cdcc835618f853a63d07473510655aa0100", - - /* SGSN with IAXMODEM V.42bis */ - "45000101a0f3d84000400679210a0901abc0a800021f90400538e210f07a827bb1501900ed7be90000485454502f312e3020323030204f4b0d0a5365727665723a2053696d706c65485454502f302e3620507974686f6e2f322e372e360d0a446174653a205765642c203301312041756720323031362030393a32383a353220474d540d0a436f6e74656e742d747970653a20746578742f68746d6c3b20636861727365743d5554462d380d0a436f6e74656e742d4c656e6774683a203232320d0a0d0a66003f481c9162e40a97294800002068746d6c20506600588a3c6162644409183200002f5733432f2f4454442048544d4c20332e322046696e616c2f2f454e223e3c68746d66006f8234f87187cd1d006c653e4469726563746f7279206c697374696e672066016f72202f3c2f7469746c990068bcff2823e70c9fff6b6a943f9f7e7dfbf7f1e7d7bf9f5fb1c2ef6beafcc7d3fd3b7ced646aa34f03a404fa3373a4c64113630efdec27534e7509538d7e32ff657044a8f1bb0c82067f72f71e00", - "45000101a0e9a54000400683540a0901abc0a800021f904004437442f17a4ab3b1501900ed04900000485454502f312e3020323030204f4b0d0a5365727665723a2053696d706c65485454502f302e3620507974686f6e2f322e372e360d0a446174653a205765642c203301312041756720323031362030393a32373a353520474d540d0a436f6e74656e742d747970653a20746578742f68746d6c3b20636861727365743d5554462d380d0a436f6e74656e742d4c656e6774683a203232320d0a0d0a66003f481c9162e40a97294800002068746d6c20506600588a3c6162644409183200002f5733432f2f4454442048544d4c20332e322046696e616c2f2f454e223e3c68746d6c3e0a3c7469746c653e4469726563746f7279206c697374696e672066016f72202f3c2f7469746c990068beff2823e70c9f816b6a9847af9ebd7bf8f2e9dbc7af5ff142f06bea0cc4e31d7cfced646aa74f03a444fa3373a4c64113634e7ded28554e7d1953cd7e320365744cb811bc8c82078376ff1e00", -}; - -/* Uncompressed sample packets, sniffed from real communication */ -#define UNCOMPR_PACKETS_LEN 11 -char *uncompr_packets[] = { - "45000236000700004006cf2cc0a80002550d93d7400000501e200da7c0c95a70801840002e3700000101080a000174140853d489474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a0d0a", - "4510004046dd40004006a9a7c0a8646ec0a864640017ad8b81980100f3ac984d801800e32a1600000101080a000647de06d1bf5efffd18fffd20fffd23fffd27", - "4510005b46de40004006a98bc0a8646ec0a864640017ad8b8198010cf3ac984d801800e3867500000101080a000647df06d1bf61fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0", - "4510003746df40004006a9aec0a8646ec0a864640017ad8b81980133f3ac989f801800e35fd700000101080a000647e106d1bf63fffd01", - "4510003746e040004006a9adc0a8646ec0a864640017ad8b81980136f3ac98a2801800e35fd200000101080a000647e106d1bf64fffb01", - "4510007446e140004006a96fc0a8646ec0a864640017ad8b81980139f3ac98a5801800e37b9b00000101080a000647e206d1bf640d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a57656c6c636f6d6520746f20706f6c6c75780d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a0d0a", - "4510004246e240004006a9a0c0a8646ec0a864640017ad8b81980179f3ac98a5801800e3dab000000101080a000647ec06d1bf6f706f6c6c7578206c6f67696e3a20", - "450001a0b41140004006b8e80a0901abc0a800021f904002d5b860b5bab240ae501900ed861d0000485454502f312e3020323030204f4b0d0a5365727665723a2053696d706c65485454502f302e3620507974686f6e2f322e372e360d0a446174653a205475652c2033302041756720323031362030393a34333a303720474d540d0a436f6e74656e742d747970653a20746578742f68746d6c3b20636861727365743d5554462d380d0a436f6e74656e742d4c656e6774683a203232320d0a0d0a3c21444f43545950452068746d6c205055424c494320222d2f2f5733432f2f4454442048544d4c20332e322046696e616c2f2f454e223e3c68746d6c3e0a3c7469746c653e4469726563746f7279206c697374696e6720666f72202f3c2f7469746c653e0a3c626f64793e0a3c68323e4469726563746f7279206c697374696e6720666f72202f3c2f68323e0a3c68723e0a3c756c3e0a3c6c693e3c6120687265663d2272656470686f6e652e706e67223e72656470686f6e652e706e673c2f613e0a3c2f756c3e0a3c68723e0a3c2f626f64793e0a3c2f68746d6c3e0a", - "450000e2971b40003706026c550d93d7c0a8000200504047217f5922c903759c8018007c4fb400000101080a1153ce39002cf6e8485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613134392d3436652d34323736386138656338656330220d0a0d0a", - "450000e224f1400037067496550d93d7c0a80002005040489387ebf0c904389f8018007cec5700000101080a1153cf01002cf8fc485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613338302d3861362d34323736383761323236383830220d0a0d0a", - "450000e2b66140003706e325550d93d7c0a8000200504049fbb679bcc9051ea48018007cebea00000101080a1153cfdc002cfdb4485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343120474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338313336642d3138642d34353832306530393638303430220d0a0d0a", -}; - -/* Calculate IP Header checksum */ -static uint16_t calc_ip_csum(uint8_t *data, int len) -{ - int i; - uint32_t accumulator = 0; - uint16_t *pointer = (uint16_t *) data; - - for (i = len; i > 1; i -= 2) { - accumulator += *pointer; - pointer++; - } - - if (len % 2) - accumulator += *pointer; - - accumulator = (accumulator & 0xffff) + ((accumulator >> 16) & 0xffff); - accumulator += (accumulator >> 16) & 0xffff; - return (~accumulator); -} - -/* Calculate TCP/IP checksum */ -static uint16_t calc_tcpip_csum(const void *ctx, uint8_t *packet, int len) -{ - uint8_t *buf; - uint16_t csum; - - buf = talloc_zero_size(ctx, len); - memset(buf, 0, len); - memcpy(buf, packet + 12, 8); - buf[9] = packet[9]; - buf[11] = (len - 20) & 0xFF; - buf[10] = (len - 20) >> 8 & 0xFF; - memcpy(buf + 12, packet + 20, len - 20); - csum = calc_ip_csum(buf, len - 20 + 12); - talloc_free(buf); - return csum; -} - -/* A simple function to show the ascii content of a packet */ -void show_packet(uint8_t *packet, int len) -{ - int i; - char c; - for (i = 0; i < len; i++) { - c = packet[i]; - if (c >= 0x20 && c <= 0x7E) - printf("%c", c); - else - printf("."); - } - printf("\n"); -} - -/* A struct to capture the output data of compressor and decompressor */ -struct v42bis_output_buffer { - uint8_t *buf; - uint8_t *buf_pointer; - int len; -}; - -/* A simple testpattern generator */ -static void gen_test_pattern(uint8_t *data, int len) -{ - int i; - for (i = 0; i < len; i++) - data[i] = i & 0xF0; -} - -/* Handler to capture the output data from the compressor */ -void tx_v42bis_frame_handler(void *user_data, const uint8_t *pkt, int len) -{ - struct v42bis_output_buffer *output_buffer = - (struct v42bis_output_buffer *)user_data; - memcpy(output_buffer->buf_pointer, pkt, len); - output_buffer->buf_pointer += len; - output_buffer->len += len; - return; -} - -/* Handler to capture the output data from the decompressor */ -void tx_v42bis_data_handler(void *user_data, const uint8_t *buf, int len) -{ - /* stub, never used */ - OSMO_ASSERT(false); - return; -} - -/* Handler to capture the output data from the compressor */ -void rx_v42bis_frame_handler(void *user_data, const uint8_t *pkt, int len) -{ - /* stub, never used */ - OSMO_ASSERT(false); - return; -} - -/* Handler to capture the output data from the decompressor */ -void rx_v42bis_data_handler(void *user_data, const uint8_t *buf, int len) -{ - struct v42bis_output_buffer *output_buffer = - (struct v42bis_output_buffer *)user_data; - memcpy(output_buffer->buf_pointer, buf, len); - output_buffer->buf_pointer += len; - output_buffer->len += len; - return; -} - -/* Test V.42bis compression and decompression */ -static void v42bis(const void *ctx, int mode, uint8_t *testvec, int len) -{ - v42bis_state_t *tx_state; - v42bis_state_t *rx_state; - uint8_t *uncompressed_original; - uint8_t *compressed; - uint8_t *uncompressed; - - uncompressed_original = talloc_zero_size(ctx, len); - uncompressed = talloc_zero_size(ctx, len); - - /* Note: We allocate double the size for the compressed buffer, - * because in some cases the compression may increase the amount. - * of data. */ - compressed = talloc_zero_size(ctx, len * 2); - - int rc; - int rc_sum = 0; - struct v42bis_output_buffer compressed_data; - struct v42bis_output_buffer uncompressed_data; - - /* Initalize */ - tx_state = - v42bis_init(ctx, NULL, P0, P1, P2, - &tx_v42bis_frame_handler, NULL, MAX_BLOCK_SIZE, - &tx_v42bis_data_handler, NULL, MAX_BLOCK_SIZE); - OSMO_ASSERT(tx_state); - rx_state = - v42bis_init(ctx, NULL, P0, P1, P2, - &rx_v42bis_frame_handler, NULL, MAX_BLOCK_SIZE, - &rx_v42bis_data_handler, NULL, MAX_BLOCK_SIZE); - OSMO_ASSERT(rx_state); - v42bis_compression_control(tx_state, mode); - - /* Setup input data */ - memcpy(uncompressed_original, testvec, len); - - /* Run compressor */ - compressed_data.buf = compressed; - compressed_data.buf_pointer = compressed; - compressed_data.len = 0; - tx_state->compress.user_data = (&compressed_data); - rc = v42bis_compress(tx_state, uncompressed_original, len); - printf("v42bis_compress() rc=%d\n", rc); - OSMO_ASSERT(rc == 0); - rc = v42bis_compress_flush(tx_state); - printf("v42bis_compress_flush() rc=%d\n", rc); - OSMO_ASSERT(rc == 0); - - /* Decompress again */ - uncompressed_data.buf = uncompressed; - uncompressed_data.buf_pointer = uncompressed; - uncompressed_data.len = 0; - rx_state->decompress.user_data = (&uncompressed_data); - rc = v42bis_decompress(rx_state, compressed_data.buf, - compressed_data.len); - printf("v42bis_decompress() rc=%d\n", rc); - rc = v42bis_decompress_flush(rx_state); - rc_sum += rc; - printf("v42bis_decompress_flush() rc=%d\n", rc); - rc_sum += rc; - - /* Check results */ - printf("Mode: %i\n", mode); - - printf("uncompressed_original= %s ASCII:", - osmo_hexdump_nospc(uncompressed_original, len)); - show_packet(uncompressed_original, len); - printf("uncompressed= %s ASCII:", - osmo_hexdump_nospc(uncompressed_data.buf, - uncompressed_data.len)); - show_packet(uncompressed_data.buf, uncompressed_data.len); - printf("compressed= %s ASCII:", - osmo_hexdump_nospc(compressed_data.buf, compressed_data.len)); - show_packet(compressed_data.buf, compressed_data.len); - - rc = memcmp(uncompressed, uncompressed_original, len); - printf("memcmp() rc=%d\n", rc); - rc_sum += rc; - OSMO_ASSERT(rc_sum == 0); - - /* Free buffers and exit */ - v42bis_free(tx_state); - v42bis_free(rx_state); - talloc_free(uncompressed_original); - talloc_free(compressed); - talloc_free(uncompressed); - printf("\n"); -} - -/* Test V.42bis compression and decompression with generated data*/ -static void test_v42bis(const void *ctx) -{ - printf("Testing compression/decompression with generated data:\n"); - uint8_t testvec[1024]; - int len = sizeof(testvec); - gen_test_pattern(testvec, len); - v42bis(ctx, V42BIS_COMPRESSION_MODE_DYNAMIC, testvec, len); - v42bis(ctx, V42BIS_COMPRESSION_MODE_ALWAYS, testvec, len); - v42bis(ctx, V42BIS_COMPRESSION_MODE_NEVER, testvec, len); -} - -/* Test V.42bis compression and decompression with some TCP/IP packets */ -static void test_v42bis_tcpip(const void *ctx, int packet_id) -{ - uint8_t *testvec; - int len; - printf - ("Testing compression/decompression with realistic TCP/IP packets:\n"); - printf("Packet No.: %i\n", packet_id); - len = strlen(uncompr_packets[packet_id]); - testvec = talloc_zero_size(ctx, len); - len = osmo_hexparse(uncompr_packets[packet_id], testvec, len); - OSMO_ASSERT(len > 0); - v42bis(ctx, V42BIS_COMPRESSION_MODE_DYNAMIC, testvec, len); - v42bis(ctx, V42BIS_COMPRESSION_MODE_ALWAYS, testvec, len); - v42bis(ctx, V42BIS_COMPRESSION_MODE_NEVER, testvec, len); - talloc_free(testvec); -} - -/* Test V.42bis decompression with real, sniffed packets */ -static void test_v42bis_tcpip_decompress(const void *ctx, int packet_id) -{ - uint8_t *compressed; - int compressed_len; - uint8_t *uncompressed; - v42bis_state_t *rx_state; - int rc; - int rc_sum = 0; - int len; - struct v42bis_output_buffer uncompressed_data; - - printf - ("Testing decompression with sniffed compressed TCP/IP packets:\n"); - printf("Packet No.: %i\n", packet_id); - len = strlen(compr_packets[packet_id]); - - uncompressed = talloc_zero_size(ctx, len); - compressed = talloc_zero_size(ctx, len); - - /* Initalize */ - rx_state = - v42bis_init(ctx, NULL, P0, P1, P2, - &rx_v42bis_frame_handler, NULL, MAX_BLOCK_SIZE, - &rx_v42bis_data_handler, NULL, MAX_BLOCK_SIZE); - OSMO_ASSERT(rx_state); - - /* Setup input data */ - compressed_len = - osmo_hexparse(compr_packets[packet_id], compressed, len); - - /* Decompress */ - uncompressed_data.buf = uncompressed; - uncompressed_data.buf_pointer = uncompressed; - uncompressed_data.len = 0; - rx_state->decompress.user_data = (&uncompressed_data); - rc = v42bis_decompress_flush(rx_state); - printf("v42bis_decompress_flush() rc=%d\n", rc); - rc_sum += rc; - rc = v42bis_decompress(rx_state, compressed, compressed_len); - printf("v42bis_decompress() rc=%d\n", rc); - rc_sum += rc; - rc = v42bis_decompress_flush(rx_state); - printf("v42bis_decompress_flush() rc=%d\n", rc); - rc_sum += rc; - - /* Check results */ - printf("compressed= %s ASCII:", - osmo_hexdump_nospc(compressed, compressed_len)); - show_packet(compressed, compressed_len); - printf("uncompressed= %s ASCII:", - osmo_hexdump_nospc(uncompressed_data.buf, - uncompressed_data.len)); - show_packet(uncompressed_data.buf, uncompressed_data.len); - - OSMO_ASSERT(calc_ip_csum(uncompressed_data.buf, 20) == 0); - OSMO_ASSERT(calc_tcpip_csum(ctx, uncompressed_data.buf, - uncompressed_data.len) == 0); - - /* Free buffers and exit */ - v42bis_free(rx_state); - talloc_free(uncompressed); - talloc_free(compressed); - printf("\n"); -} - -static struct log_info_cat gprs_categories[] = { - [DV42BIS] = { - .name = "DV42BIS", - .description = "V.42bis data compression (SNDCP)", - .enabled = 1,.loglevel = LOGL_DEBUG, - } -}; - -static struct log_info info = { - .cat = gprs_categories, - .num_cat = ARRAY_SIZE(gprs_categories), -}; - -int main(int argc, char **argv) -{ - void *v42bis_ctx; - void *log_ctx; - int i; - - v42bis_ctx = talloc_named_const(NULL, 0, "v42bis_ctx"); - log_ctx = talloc_named_const(v42bis_ctx, 0, "log"); - osmo_init_logging2(log_ctx, &info); - - test_v42bis(v42bis_ctx); - - for (i = 0; i < UNCOMPR_PACKETS_LEN; i++) - test_v42bis_tcpip(v42bis_ctx, i); - - for (i = 0; i < COMPR_PACKETS_LEN; i++) - test_v42bis_tcpip_decompress(v42bis_ctx, i); - - printf("Done\n"); - talloc_report_full(v42bis_ctx, stderr); - talloc_free(log_ctx); - OSMO_ASSERT(talloc_total_blocks(v42bis_ctx) == 1); - talloc_free(v42bis_ctx); - return 0; -} - -/* stubs */ -struct osmo_prim_hdr; -int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx) -{ - abort(); -} diff --git a/tests/v42bis/v42bis_test.ok b/tests/v42bis/v42bis_test.ok deleted file mode 100644 index 07076747..00000000 --- a/tests/v42bis/v42bis_test.ok +++ /dev/null @@ -1,648 +0,0 @@ -Testing compression/decompression with generated data: -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 0 -uncompressed_original= 00000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f000000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f000000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f000000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0 ASCII:................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................ -uncompressed= 00000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f000000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f000000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f000000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0 ASCII:................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................ -compressed= 000100000000000000003300040b4e9870f020428409478c58b89021c38633663c7c081162c42143264ea448b1e29429172f62c49871cc988d1b3972ec3867cec78f2041861c3468e44892244b4e9a74f2244a9429478d5ab99225cb96b366bd7c091366cc61c366cea449b3e6b469376fe2c49973dcb89d3b79f2ec396fdecf9f4081062d587028c184098d226cd83029c388119942ac58f129c58c19a562ecd8b12ac79021b1822c59722bc99429bda26cd9322ccb9831c9c2ac59f32ccd9c39d5e2ecd9b32dcfa041e102254ad4e0d1a348952a5ddab4a953a850a34e9d4ad5aad5ab59b36ae5cab5ebd7af60c58a1d5bb6ac59b468d3ae5dcbd6addbb771e3ca9d3b7740ddba07efde5d9837efc3bd7b27f6ed7bf1efdf8d81037f1c3c7864e1c2270f1f5e9938f1cbc58b67366e7cf3f1e39d9123ff0c00 ASCII:..........3...N.p. B..G.X..!..3f<|..b.!C&N.H...)./b..q....9r.8g... A..4h.H.$KN.t.$J.)G.Z..%...f.|..f.a.f..I...i7o...s...;y..9o...@..-Xp(...."l.0)....B.X.)....b...*..!..,Yr+..)..l.2,..1...Y.,..9.....-..A..%J....H.*]...S.P.N.J....Y.j......`...[..Y.h..].....q...;w@.....].7...{'..{..........wb.......8....G..|.......\.xf..7.?..9... -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 2 -uncompressed_original= 00000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f000000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f000000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f000000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0 ASCII:................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................ -uncompressed= 00000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f000000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f000000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f000000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0 ASCII:................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................ -compressed= 0001000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f000000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f000000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f000000000000000000000000000000000101010101010101010101010101010102020202020202020202020202020202030303030303030303030303030303030404040404040404040404040404040405050505050505050505050505050505060606060606060606060606060606060707070707070707070707070707070708080808080808080808080808080808090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0 ASCII:................................. 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................................................ 0000000000000000@@@@@@@@@@@@@@@@PPPPPPPPPPPPPPPP````````````````pppppppppppppppp................................................................................................................................ -memcmp() rc=0 - -Testing compression/decompression with realistic TCP/IP packets: -Packet No.: 0 -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 0 -uncompressed_original= 45000236000700004006cf2cc0a80002550d93d7400000501e200da7c0c95a70801840002e3700000101080a000174140853d489474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a0d0a ASCII:E..6....@..,....U...@..P. ....Zp..@..7........t..S..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip.... -uncompressed= 45000236000700004006cf2cc0a80002550d93d7400000501e200da7c0c95a70801840002e3700000101080a000174140853d489474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a0d0a ASCII:E..6....@..,....U...@..P. ....Zp..@..7........t..S..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip.... -compressed= 4500010236000700004006cf2cc0a80002550d93d7400000501e200da7c0c95a70801840002e3700000101080a000174140853d489474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c6963330062d990358b562ddb3d6beec079e3620f61bb5dbf861d5b36f0e0c287df68bd8366cfd4b369d7ce518b78440b192d820e2d7a1486913551eda0413a02cf9d343076687d1d9b460ead6cecc891bd03070f183472ef0e3e23c78d1c30f098b103a386562b6bd8a4b923a609132b5a8bb05183633451a377603c2113470d1e326ad024451327e81e189b61cca923270d9b37eb4794107c674e0f193236c7d81d870f9a3a60ed288c61460e1c195888d0b72fc3c98e1933d854a931c3a7e4124197c8b1d35a8f1e3d31fac831e34622c5a05856d78141447d9cd656c8f241e290b9c28e1fd9c8105964441534f9c9ac9601256a701bce3fea1851a4be1e9c32a2b04e52bfa70c1b316c8c9852ff7efebb4c8e4c711e63c6082364ef9faf23960d5919469e1c31123c068da0a5e3c44163666c9ca44ed018d5f9350f9aef458fc2401267e21936e6939e4193e68d58345ad5f4791a346800 ASCII:E...6....@..,....U...@..P. ....Zp..@..7........t..S..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, applic3.b..5.V-.=k..y.b.a.]...[6.....h..f...i..Q.xD..-..-z...5Q..A:...40vh}..F..l........4r..>#...0......V+k...#...+Z..Q.c4Q.w`r...H1(..u`.Q.....|.8d...G62D..Q.M~2.e@......:F......(....).F..#.......#S...1.......eCV..'G...A#h.8q....'..4Fu~...{..0...x....g..y#..V5}..... -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 2 -uncompressed_original= 45000236000700004006cf2cc0a80002550d93d7400000501e200da7c0c95a70801840002e3700000101080a000174140853d489474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a0d0a ASCII:E..6....@..,....U...@..P. ....Zp..@..7........t..S..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip.... -uncompressed= 45000236000700004006cf2cc0a80002550d93d7400000501e200da7c0c95a70801840002e3700000101080a000174140853d489474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a0d0a ASCII:E..6....@..,....U...@..P. ....Zp..@..7........t..S..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip.... -compressed= 4500010236000700004006cf2cc0a80002550d93d7400000501e200da7c0c95a70801840002e3700000101080a000174140853d489474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d3133012d323030372042726f777365722f4e657446726f6e742f332e332050726f6601696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a0d0a ASCII:E...6....@..,....U...@..P. ....Zp..@..7........t..S..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13.-2007 Browser/NetFront/3.3 Prof.ile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip.... -memcmp() rc=0 - -Testing compression/decompression with realistic TCP/IP packets: -Packet No.: 1 -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 0 -uncompressed_original= 4510004046dd40004006a9a7c0a8646ec0a864640017ad8b81980100f3ac984d801800e32a1600000101080a000647de06d1bf5efffd18fffd20fffd23fffd27 ASCII:E..@F.@.@.....dn..dd...........M....*.........G....^..... ..#..' -uncompressed= 4510004046dd40004006a9a7c0a8646ec0a864640017ad8b81980100f3ac984d801800e32a1600000101080a000647de06d1bf5efffd18fffd20fffd23fffd27 ASCII:E..@F.@.@.....dn..dd...........M....*.........G....^..... ..#..' -compressed= 451000014046dd40004006a9a7c0a8646ec0a864640017ad8b81980100f3ac984d801800e32a1600000101080a000647de06d1bf5efffd18fffd20fffd23fffd27 ASCII:E...@F.@.@.....dn..dd...........M....*.........G....^..... ..#..' -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 1 -uncompressed_original= 4510004046dd40004006a9a7c0a8646ec0a864640017ad8b81980100f3ac984d801800e32a1600000101080a000647de06d1bf5efffd18fffd20fffd23fffd27 ASCII:E..@F.@.@.....dn..dd...........M....*.........G....^..... ..#..' -uncompressed= 4510004046dd40004006a9a7c0a8646ec0a864640017ad8b81980100f3ac984d801800e32a1600000101080a000647de06d1bf5efffd18fffd20fffd23fffd27 ASCII:E..@F.@.@.....dn..dd...........M....*.........G....^..... ..#..' -compressed= 45000013060c49026e48c104ac540d5b75268ec33367066880e588d0260203ecbdda0465d08601e65a641830800081050d062450122e013561610402dc5073444d1335550400 ASCII:E.....I.nH...T.[u&..3g.h....&......e....Zd.0......$P...5aa...PsDM.5U.. -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 2 -uncompressed_original= 4510004046dd40004006a9a7c0a8646ec0a864640017ad8b81980100f3ac984d801800e32a1600000101080a000647de06d1bf5efffd18fffd20fffd23fffd27 ASCII:E..@F.@.@.....dn..dd...........M....*.........G....^..... ..#..' -uncompressed= 4510004046dd40004006a9a7c0a8646ec0a864640017ad8b81980100f3ac984d801800e32a1600000101080a000647de06d1bf5efffd18fffd20fffd23fffd27 ASCII:E..@F.@.@.....dn..dd...........M....*.........G....^..... ..#..' -compressed= 451000014046dd40004006a9a7c0a8646ec0a864640017ad8b81980100f3ac984d801800e32a1600000101080a000647de06d1bf5efffd18fffd20fffd23fffd27 ASCII:E...@F.@.@.....dn..dd...........M....*.........G....^..... ..#..' -memcmp() rc=0 - -Testing compression/decompression with realistic TCP/IP packets: -Packet No.: 2 -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 0 -uncompressed_original= 4510005b46de40004006a98bc0a8646ec0a864640017ad8b8198010cf3ac984d801800e3867500000101080a000647df06d1bf61fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0 ASCII:E..[F.@.@.....dn..dd...........M.....u........G....a........!.."..... .....#.....'......... -uncompressed= 4510005b46de40004006a98bc0a8646ec0a864640017ad8b8198010cf3ac984d801800e3867500000101080a000647df06d1bf61fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0 ASCII:E..[F.@.@.....dn..dd...........M.....u........G....a........!.."..... .....#.....'......... -compressed= 451000015b46de40004006a98bc0a8646ec0a864640017ad8b8198010cf3ac984d801800e3867500000101080a000647df06d1bf61fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0 ASCII:E...[F.@.@.....dn..dd...........M.....u........G....a........!.."..... .....#.....'......... -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 1 -uncompressed_original= 4510005b46de40004006a98bc0a8646ec0a864640017ad8b8198010cf3ac984d801800e3867500000101080a000647df06d1bf61fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0 ASCII:E..[F.@.@.....dn..dd...........M.....u........G....a........!.."..... .....#.....'......... -uncompressed= 4510005b46de40004006a98bc0a8646ec0a864640017ad8b8198010cf3ac984d801800e3867500000101080a000647df06d1bf61fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0 ASCII:E..[F.@.@.....dn..dd...........M.....u........G....a........!.."..... .....#.....'......... -compressed= 45000013067849126ec880210958391ab6ea4c9c8767ce0cd000cb11a14d041ed87bb509caa00d03cc25c233600001020b1a0c48a0445c026ac2c808f467402040113949080c58c2260281fd461010386fa809a348fba9583a74c3d200 ASCII:E....xI.n..!.X9...L..g.......M...{.......%.3`......H.D\.j....g@ @.9I..X.&...F..8o...H..X:t... -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 2 -uncompressed_original= 4510005b46de40004006a98bc0a8646ec0a864640017ad8b8198010cf3ac984d801800e3867500000101080a000647df06d1bf61fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0 ASCII:E..[F.@.@.....dn..dd...........M.....u........G....a........!.."..... .....#.....'......... -uncompressed= 4510005b46de40004006a98bc0a8646ec0a864640017ad8b8198010cf3ac984d801800e3867500000101080a000647df06d1bf61fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0 ASCII:E..[F.@.@.....dn..dd...........M.....u........G....a........!.."..... .....#.....'......... -compressed= 451000015b46de40004006a98bc0a8646ec0a864640017ad8b8198010cf3ac984d801800e3867500000101080a000647df06d1bf61fffb03fffd1ffffd21fffe22fffb05fffa2001fff0fffa2301fff0fffa2701fff0fffa1801fff0 ASCII:E...[F.@.@.....dn..dd...........M.....u........G....a........!.."..... .....#.....'......... -memcmp() rc=0 - -Testing compression/decompression with realistic TCP/IP packets: -Packet No.: 3 -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 0 -uncompressed_original= 4510003746df40004006a9aec0a8646ec0a864640017ad8b81980133f3ac989f801800e35fd700000101080a000647e106d1bf63fffd01 ASCII:E..7F.@.@.....dn..dd.......3........_.........G....c... -uncompressed= 4510003746df40004006a9aec0a8646ec0a864640017ad8b81980133f3ac989f801800e35fd700000101080a000647e106d1bf63fffd01 ASCII:E..7F.@.@.....dn..dd.......3........_.........G....c... -compressed= 451000013746df40004006a9aec0a8646ec0a864640017ad8b8198013301f3ac989f801800e35fd700000101080a000647e106d1bf63fffd01 ASCII:E...7F.@.@.....dn..dd.......3........._.........G....c... -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 1 -uncompressed_original= 4510003746df40004006a9aec0a8646ec0a864640017ad8b81980133f3ac989f801800e35fd700000101080a000647e106d1bf63fffd01 ASCII:E..7F.@.@.....dn..dd.......3........_.........G....c... -uncompressed= 4510003746df40004006a9aec0a8646ec0a864640017ad8b81980133f3ac989f801800e35fd700000101080a000647e106d1bf63fffd01 ASCII:E..7F.@.@.....dn..dd.......3........_.........G....c... -compressed= 4500001306e848226ec880210958c51ab6ea4c9c8767ce0cd000cb11a14d046cd87bb549d4a00d03cc89d136600001020b1a0c48a0845c026ac2cc0804482000 ASCII:E.....H"n..!.X....L..g.......M.l.{.I.......6`......H..\.j....H . -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 2 -uncompressed_original= 4510003746df40004006a9aec0a8646ec0a864640017ad8b81980133f3ac989f801800e35fd700000101080a000647e106d1bf63fffd01 ASCII:E..7F.@.@.....dn..dd.......3........_.........G....c... -uncompressed= 4510003746df40004006a9aec0a8646ec0a864640017ad8b81980133f3ac989f801800e35fd700000101080a000647e106d1bf63fffd01 ASCII:E..7F.@.@.....dn..dd.......3........_.........G....c... -compressed= 451000013746df40004006a9aec0a8646ec0a864640017ad8b8198013301f3ac989f801800e35fd700000101080a000647e106d1bf63fffd01 ASCII:E...7F.@.@.....dn..dd.......3........._.........G....c... -memcmp() rc=0 - -Testing compression/decompression with realistic TCP/IP packets: -Packet No.: 4 -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 0 -uncompressed_original= 4510003746e040004006a9adc0a8646ec0a864640017ad8b81980136f3ac98a2801800e35fd200000101080a000647e106d1bf64fffb01 ASCII:E..7F.@.@.....dn..dd.......6........_.........G....d... -uncompressed= 4510003746e040004006a9adc0a8646ec0a864640017ad8b81980136f3ac98a2801800e35fd200000101080a000647e106d1bf64fffb01 ASCII:E..7F.@.@.....dn..dd.......6........_.........G....d... -compressed= 451000013746e040004006a9adc0a8646ec0a864640017ad8b81980136f3ac98a2801800e35fd200000101080a000647e106d1bf64fffb01 ASCII:E...7F.@.@.....dn..dd.......6........_.........G....d... -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 1 -uncompressed_original= 4510003746e040004006a9adc0a8646ec0a864640017ad8b81980136f3ac98a2801800e35fd200000101080a000647e106d1bf64fffb01 ASCII:E..7F.@.@.....dn..dd.......6........_.........G....d... -uncompressed= 4510003746e040004006a9adc0a8646ec0a864640017ad8b81980136f3ac98a2801800e35fd200000101080a000647e106d1bf64fffb01 ASCII:E..7F.@.@.....dn..dd.......6........_.........G....d... -compressed= 4500001306e848326ec880210958c11ab6ea4c9c8767ce0cd000cb11a14d0472d87bb5a9d4a00d03cc89a936600001020b1a0c48a0845c026ac2ce08f4472000 ASCII:E.....H2n..!.X....L..g.......M.r.{.........6`......H..\.j....G . -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 2 -uncompressed_original= 4510003746e040004006a9adc0a8646ec0a864640017ad8b81980136f3ac98a2801800e35fd200000101080a000647e106d1bf64fffb01 ASCII:E..7F.@.@.....dn..dd.......6........_.........G....d... -uncompressed= 4510003746e040004006a9adc0a8646ec0a864640017ad8b81980136f3ac98a2801800e35fd200000101080a000647e106d1bf64fffb01 ASCII:E..7F.@.@.....dn..dd.......6........_.........G....d... -compressed= 451000013746e040004006a9adc0a8646ec0a864640017ad8b81980136f3ac98a2801800e35fd200000101080a000647e106d1bf64fffb01 ASCII:E...7F.@.@.....dn..dd.......6........_.........G....d... -memcmp() rc=0 - -Testing compression/decompression with realistic TCP/IP packets: -Packet No.: 5 -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 0 -uncompressed_original= 4510007446e140004006a96fc0a8646ec0a864640017ad8b81980139f3ac98a5801800e37b9b00000101080a000647e206d1bf640d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a57656c6c636f6d6520746f20706f6c6c75780d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a0d0a ASCII:E..tF.@.@..o..dn..dd.......9........{.........G....d..------------------..Wellcome to pollux..------------------.... -uncompressed= 4510007446e140004006a96fc0a8646ec0a864640017ad8b81980139f3ac98a5801800e37b9b00000101080a000647e206d1bf640d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a57656c6c636f6d6520746f20706f6c6c75780d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a0d0a ASCII:E..tF.@.@..o..dn..dd.......9........{.........G....d..------------------..Wellcome to pollux..------------------.... -compressed= 451000017446e140004006a96fc0a8646ec0a864640017ad8b81980139f3ac98a5801800e37b9b00000101080a000647e206d1bf640d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3300386d6a41f3e68d193970d08cb82367c41c3940f1ecb1b97327549e0d6c0600 ASCII:E...tF.@.@..o..dn..dd.......9........{.........G....d..----------------3.8mjA....9p...#g..9@....s'T..l.. -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 1 -uncompressed_original= 4510007446e140004006a96fc0a8646ec0a864640017ad8b81980139f3ac98a5801800e37b9b00000101080a000647e206d1bf640d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a57656c6c636f6d6520746f20706f6c6c75780d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a0d0a ASCII:E..tF.@.@..o..dn..dd.......9........{.........G....d..------------------..Wellcome to pollux..------------------.... -uncompressed= 4510007446e140004006a96fc0a8646ec0a864640017ad8b81980139f3ac98a5801800e37b9b00000101080a000647e206d1bf640d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a57656c6c636f6d6520746f20706f6c6c75780d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a0d0a ASCII:E..tF.@.@..o..dn..dd.......9........{.........G....d..------------------..Wellcome to pollux..------------------.... -compressed= 4500001306dc49426ec880210958c919b6ea4c9c8767ce0cd000cb11a14d0478d87bb509d5a00d03ccf9f134600001020b1a0c48a0a45c026ac2ce40680003064e9c3973eac469530b9a376fccc8818366c41d3923e6c8018a678fcd9d3ba1f26c603300 ASCII:E.....IBn..!.X....L..g.......M.x.{.........4`......H..\.j..@h...N.9s..iS..7o....f..9#....g...;..l`3. -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 2 -uncompressed_original= 4510007446e140004006a96fc0a8646ec0a864640017ad8b81980139f3ac98a5801800e37b9b00000101080a000647e206d1bf640d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a57656c6c636f6d6520746f20706f6c6c75780d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a0d0a ASCII:E..tF.@.@..o..dn..dd.......9........{.........G....d..------------------..Wellcome to pollux..------------------.... -uncompressed= 4510007446e140004006a96fc0a8646ec0a864640017ad8b81980139f3ac98a5801800e37b9b00000101080a000647e206d1bf640d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a57656c6c636f6d6520746f20706f6c6c75780d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a0d0a ASCII:E..tF.@.@..o..dn..dd.......9........{.........G....d..------------------..Wellcome to pollux..------------------.... -compressed= 451000017446e140004006a96fc0a8646ec0a864640017ad8b81980139f3ac98a5801800e37b9b00000101080a000647e206d1bf640d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a57656c6c636f6d6520746f20706f6c6c75780d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0d0a0d0a ASCII:E...tF.@.@..o..dn..dd.......9........{.........G....d..------------------..Wellcome to pollux..------------------.... -memcmp() rc=0 - -Testing compression/decompression with realistic TCP/IP packets: -Packet No.: 6 -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 0 -uncompressed_original= 4510004246e240004006a9a0c0a8646ec0a864640017ad8b81980179f3ac98a5801800e3dab000000101080a000647ec06d1bf6f706f6c6c7578206c6f67696e3a20 ASCII:E..BF.@.@.....dn..dd.......y..................G....opollux login: -uncompressed= 4510004246e240004006a9a0c0a8646ec0a864640017ad8b81980179f3ac98a5801800e3dab000000101080a000647ec06d1bf6f706f6c6c7578206c6f67696e3a20 ASCII:E..BF.@.@.....dn..dd.......y..................G....opollux login: -compressed= 451000014246e240004006a9a0c0a8646ec0a864640017ad8b81980179f3ac98a5801800e3dab000000101080a000647ec06d1bf6f706f6c6c7578206c6f67696e3a20 ASCII:E...BF.@.@.....dn..dd.......y..................G....opollux login: -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 1 -uncompressed_original= 4510004246e240004006a9a0c0a8646ec0a864640017ad8b81980179f3ac98a5801800e3dab000000101080a000647ec06d1bf6f706f6c6c7578206c6f67696e3a20 ASCII:E..BF.@.@.....dn..dd.......y..................G....opollux login: -uncompressed= 4510004246e240004006a9a0c0a8646ec0a864640017ad8b81980179f3ac98a5801800e3dab000000101080a000647ec06d1bf6f706f6c6c7578206c6f67696e3a20 ASCII:E..BF.@.@.....dn..dd.......y..................G....opollux login: -compressed= 45000013061449526ec8802109588d1ab6ea4c9c8767ce0cd000cb11a14d04f8d87bb509d5a00d03cc759b35600001020b1a0c48a0e45d026ac2e4cc91f3e60d9e3d23dec851c3264e8f110100 ASCII:E.....IRn..!.X....L..g.......M...{.......u.5`......H..].j........=#..Q.&N.... -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 2 -uncompressed_original= 4510004246e240004006a9a0c0a8646ec0a864640017ad8b81980179f3ac98a5801800e3dab000000101080a000647ec06d1bf6f706f6c6c7578206c6f67696e3a20 ASCII:E..BF.@.@.....dn..dd.......y..................G....opollux login: -uncompressed= 4510004246e240004006a9a0c0a8646ec0a864640017ad8b81980179f3ac98a5801800e3dab000000101080a000647ec06d1bf6f706f6c6c7578206c6f67696e3a20 ASCII:E..BF.@.@.....dn..dd.......y..................G....opollux login: -compressed= 451000014246e240004006a9a0c0a8646ec0a864640017ad8b81980179f3ac98a5801800e3dab000000101080a000647ec06d1bf6f706f6c6c7578206c6f67696e3a20 ASCII:E...BF.@.@.....dn..dd.......y..................G....opollux login: -memcmp() rc=0 - -Testing compression/decompression with realistic TCP/IP packets: -Packet No.: 7 -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 0 -uncompressed_original= 450001a0b41140004006b8e80a0901abc0a800021f904002d5b860b5bab240ae501900ed861d0000485454502f312e3020323030204f4b0d0a5365727665723a2053696d706c65485454502f302e3620507974686f6e2f322e372e360d0a446174653a205475652c2033302041756720323031362030393a34333a303720474d540d0a436f6e74656e742d747970653a20746578742f68746d6c3b20636861727365743d5554462d380d0a436f6e74656e742d4c656e6774683a203232320d0a0d0a3c21444f43545950452068746d6c205055424c494320222d2f2f5733432f2f4454442048544d4c20332e322046696e616c2f2f454e223e3c68746d6c3e0a3c7469746c653e4469726563746f7279206c697374696e6720666f72202f3c2f7469746c653e0a3c626f64793e0a3c68323e4469726563746f7279206c697374696e6720666f72202f3c2f68323e0a3c68723e0a3c756c3e0a3c6c693e3c6120687265663d2272656470686f6e652e706e67223e72656470686f6e652e706e673c2f613e0a3c2f756c3e0a3c68723e0a3c2f626f64793e0a3c2f68746d6c3e0a ASCII:E.....@.@.............@...`...@.P.......HTTP/1.0 200 OK..Server: SimpleHTTP/0.6 Python/2.7.6..Date: Tue, 30 Aug 2016 09:43:07 GMT..Content-type: text/html; charset=UTF-8..Content-Length: 222.....Directory listing for /..

Directory listing for /

.
..
... -uncompressed= 450001a0b41140004006b8e80a0901abc0a800021f904002d5b860b5bab240ae501900ed861d0000485454502f312e3020323030204f4b0d0a5365727665723a2053696d706c65485454502f302e3620507974686f6e2f322e372e360d0a446174653a205475652c2033302041756720323031362030393a34333a303720474d540d0a436f6e74656e742d747970653a20746578742f68746d6c3b20636861727365743d5554462d380d0a436f6e74656e742d4c656e6774683a203232320d0a0d0a3c21444f43545950452068746d6c205055424c494320222d2f2f5733432f2f4454442048544d4c20332e322046696e616c2f2f454e223e3c68746d6c3e0a3c7469746c653e4469726563746f7279206c697374696e6720666f72202f3c2f7469746c653e0a3c626f64793e0a3c68323e4469726563746f7279206c697374696e6720666f72202f3c2f68323e0a3c68723e0a3c756c3e0a3c6c693e3c6120687265663d2272656470686f6e652e706e67223e72656470686f6e652e706e673c2f613e0a3c2f756c3e0a3c68723e0a3c2f626f64793e0a3c2f68746d6c3e0a ASCII:E.....@.@.............@...`...@.P.......HTTP/1.0 200 OK..Server: SimpleHTTP/0.6 Python/2.7.6..Date: Tue, 30 Aug 2016 09:43:07 GMT..Content-type: text/html; charset=UTF-8..Content-Length: 222.....Directory listing for /..

Directory listing for /

.
..
... -compressed= 45000101a0b41140004006b8e80a0901abc0a800021f904002d5b860b5bab240ae501900ed861d0000485454502f312e3020323030204f4b0d0a5365727665723a2053696d706c65485454502f302e3620507974686f6e2f322e372e360d0a446174653a205475652c203301302041756720323031362030393a34333a303720474d540d0a436f6e74656e742d747970653a20746578742f68746d6c3b20636861727365743d5554462d380d0a436f6e74656e742d4c656e6774683a206600356ad4c899f3078923528c5ce13205c908c58c9d6229f2848991112560c890a1050033432f2f4454442048544d4c20332e322046696e616c2f2f454e223e3c68746d6c3e0a3c7469746c653e4469726563746f7279206c697374696e672066016f72202f3c2f7469746c990068bcff2823e70c9fff6b6a943f9f7e7dfbf7f1e7d7bf9f3fb1c2ef6beafcc7d3fd3b7ced6468a34f03a404fa3373a4c64113630efdec27534e7509538d7e32ff657044a8f1bb0c82067f72f71e00 ASCII:E......@.@.............@...`...@.P.......HTTP/1.0 200 OK..Server: SimpleHTTP/0.6 Python/2.7.6..Date: Tue, 3.0 Aug 2016 09:43:07 GMT..Content-type: text/html; charset=UTF-8..Content-Length: f.5j......#R.\.2......b).....%`.....3C//DTD HTML 3.2 Final//EN">.Directory listing f.or /</titl..h..(#....kj.?.~}.......?...k.....;|.dh.O....3s..A.c...'SNu.S.~2.epD.......r... -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 1 -uncompressed_original= 450001a0b41140004006b8e80a0901abc0a800021f904002d5b860b5bab240ae501900ed861d0000485454502f312e3020323030204f4b0d0a5365727665723a2053696d706c65485454502f302e3620507974686f6e2f322e372e360d0a446174653a205475652c2033302041756720323031362030393a34333a303720474d540d0a436f6e74656e742d747970653a20746578742f68746d6c3b20636861727365743d5554462d380d0a436f6e74656e742d4c656e6774683a203232320d0a0d0a3c21444f43545950452068746d6c205055424c494320222d2f2f5733432f2f4454442048544d4c20332e322046696e616c2f2f454e223e3c68746d6c3e0a3c7469746c653e4469726563746f7279206c697374696e6720666f72202f3c2f7469746c653e0a3c626f64793e0a3c68323e4469726563746f7279206c697374696e6720666f72202f3c2f68323e0a3c68723e0a3c756c3e0a3c6c693e3c6120687265663d2272656470686f6e652e706e67223e72656470686f6e652e706e673c2f613e0a3c2f756c3e0a3c68723e0a3c2f626f64793e0a3c2f68746d6c3e0a ASCII:E.....@.@.............@...`...@.P.......HTTP/1.0 200 OK..Server: SimpleHTTP/0.6 Python/2.7.6..Date: Tue, 30 Aug 2016 09:43:07 GMT..Content-type: text/html; charset=UTF-8..Content-Length: 222....<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html>.<title>Directory listing for /..

Directory listing for /

.
..
... -uncompressed= 450001a0b41140004006b8e80a0901abc0a800021f904002d5b860b5bab240ae501900ed861d0000485454502f312e3020323030204f4b0d0a5365727665723a2053696d706c65485454502f302e3620507974686f6e2f322e372e360d0a446174653a205475652c2033302041756720323031362030393a34333a303720474d540d0a436f6e74656e742d747970653a20746578742f68746d6c3b20636861727365743d5554462d380d0a436f6e74656e742d4c656e6774683a203232320d0a0d0a3c21444f43545950452068746d6c205055424c494320222d2f2f5733432f2f4454442048544d4c20332e322046696e616c2f2f454e223e3c68746d6c3e0a3c7469746c653e4469726563746f7279206c697374696e6720666f72202f3c2f7469746c653e0a3c626f64793e0a3c68323e4469726563746f7279206c697374696e6720666f72202f3c2f68323e0a3c68723e0a3c756c3e0a3c6c693e3c6120687265663d2272656470686f6e652e706e67223e72656470686f6e652e706e673c2f613e0a3c2f756c3e0a3c68723e0a3c2f626f64793e0a3c2f68746d6c3e0a ASCII:E.....@.@.............@...`...@.P.......HTTP/1.0 200 OK..Server: SimpleHTTP/0.6 Python/2.7.6..Date: Tue, 30 Aug 2016 09:43:07 GMT..Content-type: text/html; charset=UTF-8..Content-Length: 222.....Directory listing for /..

Directory listing for /

.
..
... -compressed= 45000003088cba4561c880210976ad6bc08080ab61ab061410316948016cbbc6e0ea556b48ac291c06c04b0462c0802557ae4c914123c68c113566c894e20442032b68eae4e1d96384153670e6bc41b3b2a58c1931728c98c2e7ce1a397164d488a18369ce2364eea0017a050f9a17236cc8248247cdcc19349acee0d1e3868d1e33748c5002e54a4e2353bbc6b903e30e9f395e4774dd7347c69a3b70def81861660d993a76d0dc0182e54a12183bf4f245e317c693cf6aa202ad51a346ce9c3f481c9162e40a972948462866ec144b91274c8c8c280143860c2d368c003f72e5c88895509e908d516344123671c8bc018e244a89203f6abf09d2e0c71d36778c0639c2a60e1a3377e4d4e133e20d1b3be1e3a44dc37e848c1f32c28f47e3fd47193967f8fc5f53a3fcf9f4ebdbbf8f3fbffefdfc89157e5f53e73f9eeedfe16b27431b7d1a2025d09f9923350e9a1873e8673f9972aa4b986af493f92f8323428ddf651034f893bbf700 ASCII:E......Ea..!.v.k....a....1iH.l....UkH.)...K.b..%W.L.A#...5f....B.+h....c..6p..A.....1r......9qd....i.#d...z....#l.$.G...4........3t.P..JN#S.......9^Gt.sG..;p...af..:v.....J..;..E.....j...Q.F..?H..b...)HF(f..K.'L..(.C..-6..?r....P...QcD.6q....$J. ?j......6w..9....3w...3...;...M.~...2..G..G.9g.._S........?......~_S.?....k'C.}. %...#5...s.g?.r.K.j.../.#B..e.4..... -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 2 -uncompressed_original= 450001a0b41140004006b8e80a0901abc0a800021f904002d5b860b5bab240ae501900ed861d0000485454502f312e3020323030204f4b0d0a5365727665723a2053696d706c65485454502f302e3620507974686f6e2f322e372e360d0a446174653a205475652c2033302041756720323031362030393a34333a303720474d540d0a436f6e74656e742d747970653a20746578742f68746d6c3b20636861727365743d5554462d380d0a436f6e74656e742d4c656e6774683a203232320d0a0d0a3c21444f43545950452068746d6c205055424c494320222d2f2f5733432f2f4454442048544d4c20332e322046696e616c2f2f454e223e3c68746d6c3e0a3c7469746c653e4469726563746f7279206c697374696e6720666f72202f3c2f7469746c653e0a3c626f64793e0a3c68323e4469726563746f7279206c697374696e6720666f72202f3c2f68323e0a3c68723e0a3c756c3e0a3c6c693e3c6120687265663d2272656470686f6e652e706e67223e72656470686f6e652e706e673c2f613e0a3c2f756c3e0a3c68723e0a3c2f626f64793e0a3c2f68746d6c3e0a ASCII:E.....@.@.............@...`...@.P.......HTTP/1.0 200 OK..Server: SimpleHTTP/0.6 Python/2.7.6..Date: Tue, 30 Aug 2016 09:43:07 GMT..Content-type: text/html; charset=UTF-8..Content-Length: 222.....Directory listing for /..

Directory listing for /

.
..
... -uncompressed= 450001a0b41140004006b8e80a0901abc0a800021f904002d5b860b5bab240ae501900ed861d0000485454502f312e3020323030204f4b0d0a5365727665723a2053696d706c65485454502f302e3620507974686f6e2f322e372e360d0a446174653a205475652c2033302041756720323031362030393a34333a303720474d540d0a436f6e74656e742d747970653a20746578742f68746d6c3b20636861727365743d5554462d380d0a436f6e74656e742d4c656e6774683a203232320d0a0d0a3c21444f43545950452068746d6c205055424c494320222d2f2f5733432f2f4454442048544d4c20332e322046696e616c2f2f454e223e3c68746d6c3e0a3c7469746c653e4469726563746f7279206c697374696e6720666f72202f3c2f7469746c653e0a3c626f64793e0a3c68323e4469726563746f7279206c697374696e6720666f72202f3c2f68323e0a3c68723e0a3c756c3e0a3c6c693e3c6120687265663d2272656470686f6e652e706e67223e72656470686f6e652e706e673c2f613e0a3c2f756c3e0a3c68723e0a3c2f626f64793e0a3c2f68746d6c3e0a ASCII:E.....@.@.............@...`...@.P.......HTTP/1.0 200 OK..Server: SimpleHTTP/0.6 Python/2.7.6..Date: Tue, 30 Aug 2016 09:43:07 GMT..Content-type: text/html; charset=UTF-8..Content-Length: 222.....Directory listing for /..

Directory listing for /

.
..
... -compressed= 45000101a0b41140004006b8e80a0901abc0a800021f904002d5b860b5bab240ae501900ed861d0000485454502f312e3020323030204f4b0d0a5365727665723a2053696d706c65485454502f302e3620507974686f6e2f322e372e360d0a446174653a205475652c203301302041756720323031362030393a34333a303720474d540d0a436f6e74656e742d747970653a20746578742f68746d6c3b20636861727365743d5554462d380d0a436f6e74656e742d4c656e6774683a203232320d0a0d0a3c21444f43545950452068746d6c205055424c494320222d2f2f5733432f2f4454442048544d4c20332e322046696e616c2f2f454e223e3c68746d6c3e0a3c7469746c653e4469726563746f7279206c697374696e672066016f72202f3c2f7469746c653e0a3c626f64793e0a3c68323e4469726563746f7279206c697374696e6720666f72202f3c2f68323e0a3c68723e0a3c756c3e0a3c6c693e3c6120687265663d2272656470686f6e652e706e67223e72656470686f6e652e706e673c2f613e0a3c2f756c3e0a3c68723e0a3c2f626f64793e0a3c2f68746d6c3e0a ASCII:E......@.@.............@...`...@.P.......HTTP/1.0 200 OK..Server: SimpleHTTP/0.6 Python/2.7.6..Date: Tue, 3.0 Aug 2016 09:43:07 GMT..Content-type: text/html; charset=UTF-8..Content-Length: 222.....Directory listing f.or /..

Directory listing for /

.
..
... -memcmp() rc=0 - -Testing compression/decompression with realistic TCP/IP packets: -Packet No.: 8 -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 0 -uncompressed_original= 450000e2971b40003706026c550d93d7c0a8000200504047217f5922c903759c8018007c4fb400000101080a1153ce39002cf6e8485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613134392d3436652d34323736386138656338656330220d0a0d0a ASCII:E.....@.7..lU........P@G!.Y"..u....|O........S.9.,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:40 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8a149-46e-42768a8ec8ec0".... -uncompressed= 450000e2971b40003706026c550d93d7c0a8000200504047217f5922c903759c8018007c4fb400000101080a1153ce39002cf6e8485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613134392d3436652d34323736386138656338656330220d0a0d0a ASCII:E.....@.7..lU........P@G!.Y"..u....|O........S.9.,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:40 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8a149-46e-42768a8ec8ec0".... -compressed= 45000100e2971b40003706026c550d93d7c0a8000200504047217f5922c903759c8018007c4fb400000101080a1153ce39002cf6e8485454502f312e312033013034204e6f74204d6f646966016965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613134392d3436652d3432373638613865633865990066669478fa3400 ASCII:E......@.7..lU........P@G!.Y"..u....|O........S.9.,..HTTP/1.1 3.04 Not Modif.ied..Date: Tue, 30 Aug 2016 16:36:40 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8a149-46e-42768a8ec8e..ff.x.4. -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 1 -uncompressed_original= 450000e2971b40003706026c550d93d7c0a8000200504047217f5922c903759c8018007c4fb400000101080a1153ce39002cf6e8485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613134392d3436652d34323736386138656338656330220d0a0d0a ASCII:E.....@.7..lU........P@G!.Y"..u....|O........S.9.,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:40 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8a149-46e-42768a8ec8ec0".... -uncompressed= 450000e2971b40003706026c550d93d7c0a8000200504047217f5922c903759c8018007c4fb400000101080a1153ce39002cf6e8485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613134392d3436652d34323736386138656338656330220d0a0d0a ASCII:E.....@.7..lU........P@G!.Y"..u....|O........S.9.,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:40 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8a149-46e-42768a8ec8ec0".... -compressed= 450000030694d3e461c8001d090abcc102c192b661ab061418306588121282b894606600cfa7411b06fc91728b2001020b1a50b0128dc78017f9d62db972658a0c1a31688cb031e3c6882872ee8c8022e70c9b346cd09c81d0e008993b687a8cb88207cd0b9f334610c1a366448d1934728c20dbc3468e1e37b82a8172e5a9153475f2ccad4a640e19336bd03c3522274e1c3466eeb0015cd5091a3473601079c3a6eed3c48b1b3fae5bb5301c3472f0dc0152432b1c327b80d0983163c6532457c8a8a95ae286991d6468dce001e3460e34b76be8c8217bc760e066669478fa3400 ASCII:E.......a...........a....0e......`f...A....r. ....P........-.re...1h..1...(r..."...4l.......;hz.......3F...fD..4r. ..F..7.*.r...4u...Jd..3k.<5"'N.4f...\...4s`.y.......?.[.0.4r...RC+.2{...1c.S$W...Z....dh....F.4.k..!{.`.ff.x.4. -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 2 -uncompressed_original= 450000e2971b40003706026c550d93d7c0a8000200504047217f5922c903759c8018007c4fb400000101080a1153ce39002cf6e8485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613134392d3436652d34323736386138656338656330220d0a0d0a ASCII:E.....@.7..lU........P@G!.Y"..u....|O........S.9.,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:40 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8a149-46e-42768a8ec8ec0".... -uncompressed= 450000e2971b40003706026c550d93d7c0a8000200504047217f5922c903759c8018007c4fb400000101080a1153ce39002cf6e8485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613134392d3436652d34323736386138656338656330220d0a0d0a ASCII:E.....@.7..lU........P@G!.Y"..u....|O........S.9.,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:40 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8a149-46e-42768a8ec8ec0".... -compressed= 45000100e2971b40003706026c550d93d7c0a8000200504047217f5922c903759c8018007c4fb400000101080a1153ce39002cf6e8485454502f312e312033013034204e6f74204d6f646966016965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613134392d3436652d34323736386138656338656330220d0a0d0a ASCII:E......@.7..lU........P@G!.Y"..u....|O........S.9.,..HTTP/1.1 3.04 Not Modif.ied..Date: Tue, 30 Aug 2016 16:36:40 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8a149-46e-42768a8ec8ec0".... -memcmp() rc=0 - -Testing compression/decompression with realistic TCP/IP packets: -Packet No.: 9 -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 0 -uncompressed_original= 450000e224f1400037067496550d93d7c0a80002005040489387ebf0c904389f8018007cec5700000101080a1153cf01002cf8fc485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613338302d3861362d34323736383761323236383830220d0a0d0a ASCII:E...$.@.7.t.U........P@H......8....|.W.......S...,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:40 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8a380-8a6-427687a226880".... -uncompressed= 450000e224f1400037067496550d93d7c0a80002005040489387ebf0c904389f8018007cec5700000101080a1153cf01002cf8fc485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613338302d3861362d34323736383761323236383830220d0a0d0a ASCII:E...$.@.7.t.U........P@H......8....|.W.......S...,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:40 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8a380-8a6-427687a226880".... -compressed= 45000100e224f1400037067496550d93d7c0a80002005040489387ebf0c904389f8018007cec5700000101080a1153cf01002cf8fc485454502f312e312033013034204e6f74204d6f646966016965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613338302d3861362d34323736383761323236383830220d0a0d0a ASCII:E....$.@.7.t.U........P@H......8....|.W.......S...,..HTTP/1.1 3.04 Not Modif.ied..Date: Tue, 30 Aug 2016 16:36:40 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8a380-8a6-427687a226880".... -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 1 -uncompressed_original= 450000e224f1400037067496550d93d7c0a80002005040489387ebf0c904389f8018007cec5700000101080a1153cf01002cf8fc485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613338302d3861362d34323736383761323236383830220d0a0d0a ASCII:E...$.@.7.t.U........P@H......8....|.W.......S...,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:40 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8a380-8a6-427687a226880".... -uncompressed= 450000e224f1400037067496550d93d7c0a80002005040489387ebf0c904389f8018007cec5700000101080a1153cf01002cf8fc485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613338302d3861362d34323736383761323236383830220d0a0d0a ASCII:E...$.@.7.t.U........P@H......8....|.W.......S...,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:40 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8a380-8a6-427687a226880".... -compressed= 4500000306943b416fc8001d09ee64c202c192b661ab0614183065c8124b8adccd63766087a8411b06fc79a7852001020b1a50b0228dc08017fbfe2db972658a0c1a31688cb031e3c6882872ee8c8022e70c9b346cd09c81d0e008993b687a8cb88207cd0b9f334610c1a366448d1934728c20dbc3468e1e37b82a8172e5a9153475f2ccad4a640e19336bd03c3522274e1c3466eeb0015cd5091a3473601079c3a6eed3c48b1b3fae5bb5301c3472f0dc0152432b1c327b80d0983163c6532457c8a8a95ae286991d646cec980143760e18376ae8c8b14307991a357cd72ef1f46900 ASCII:E.....;Ao.....d.....a....0e..K...cv`..A...y.. ....P."......-.re...1h..1...(r..."...4l.......;hz.......3F...fD..4r. ..F..7.*.r...4u...Jd..3k.<5"'N.4f...\...4s`.y.......?.[.0.4r...RC+.2{...1c.S$W...Z....dl...Cv..7j...C...5|....i. -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 2 -uncompressed_original= 450000e224f1400037067496550d93d7c0a80002005040489387ebf0c904389f8018007cec5700000101080a1153cf01002cf8fc485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613338302d3861362d34323736383761323236383830220d0a0d0a ASCII:E...$.@.7.t.U........P@H......8....|.W.......S...,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:40 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8a380-8a6-427687a226880".... -uncompressed= 450000e224f1400037067496550d93d7c0a80002005040489387ebf0c904389f8018007cec5700000101080a1153cf01002cf8fc485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613338302d3861362d34323736383761323236383830220d0a0d0a ASCII:E...$.@.7.t.U........P@H......8....|.W.......S...,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:40 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8a380-8a6-427687a226880".... -compressed= 45000100e224f1400037067496550d93d7c0a80002005040489387ebf0c904389f8018007cec5700000101080a1153cf01002cf8fc485454502f312e312033013034204e6f74204d6f646966016965640d0a446174653a205475652c2033302041756720323031362031363a33363a343020474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338613338302d3861362d34323736383761323236383830220d0a0d0a ASCII:E....$.@.7.t.U........P@H......8....|.W.......S...,..HTTP/1.1 3.04 Not Modif.ied..Date: Tue, 30 Aug 2016 16:36:40 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8a380-8a6-427687a226880".... -memcmp() rc=0 - -Testing compression/decompression with realistic TCP/IP packets: -Packet No.: 10 -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 0 -uncompressed_original= 450000e2b66140003706e325550d93d7c0a8000200504049fbb679bcc9051ea48018007cebea00000101080a1153cfdc002cfdb4485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343120474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338313336642d3138642d34353832306530393638303430220d0a0d0a ASCII:E....a@.7..%U........P@I..y........|.........S...,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:41 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8136d-18d-45820e0968040".... -uncompressed= 450000e2b66140003706e325550d93d7c0a8000200504049fbb679bcc9051ea48018007cebea00000101080a1153cfdc002cfdb4485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343120474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338313336642d3138642d34353832306530393638303430220d0a0d0a ASCII:E....a@.7..%U........P@I..y........|.........S...,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:41 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8136d-18d-45820e0968040".... -compressed= 45000100e2b66140003706e325550d93d7c0a8000200504049fbb679bcc9051ea48018007cebea00000101080a1153cfdc002cfdb4485454502f312e312033013034204e6f74204d6f646966016965640d0a446174653a205475652c2033302041756720323031362031363a33363a343120474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338313336642d3138642d34353832306530393638303430220d0a0d0a ASCII:E.....a@.7..%U........P@I..y........|.........S...,..HTTP/1.1 3.04 Not Modif.ied..Date: Tue, 30 Aug 2016 16:36:41 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8136d-18d-45820e0968040".... -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 1 -uncompressed_original= 450000e2b66140003706e325550d93d7c0a8000200504049fbb679bcc9051ea48018007cebea00000101080a1153cfdc002cfdb4485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343120474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338313336642d3138642d34353832306530393638303430220d0a0d0a ASCII:E....a@.7..%U........P@I..y........|.........S...,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:41 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8136d-18d-45820e0968040".... -uncompressed= 450000e2b66140003706e325550d93d7c0a8000200504049fbb679bcc9051ea48018007cebea00000101080a1153cfdc002cfdb4485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343120474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338313336642d3138642d34353832306530393638303430220d0a0d0a ASCII:E....a@.7..%U........P@I..y........|.........S...,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:41 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8136d-18d-45820e0968040".... -compressed= 450000030694cb4566c8001d09cca1c002c192b661ab061418306508137fb9f8fc628620c4a9411b06fc71d78e2001020b1a50b022eddb8017006f2db972658a0c1a31688cb031e3c6882872ee8c8022e70c9b346cd09c81d0e008993b687a8cb88207cd0b9f334610c1a366448d1934728c20dbc3468e1e377a2a8172e5a9153475f2ccad4a640e19336bd03c3522274e1c3466eeb0015cd5091a3473601079c3a6eed3c48b1b3fae5bb5301c3472f0dc0152432b1c327b80d0983163c6532457c8a8a95ae286991d34d29e81416347ed1b387688453383478e1d40679478fa3400 ASCII:E......Ef...........a....0e......b. ..A...q.. ....P.".....o-.re...1h..1...(r..."...4l.......;hz.......3F...fD..4r. ..F..7z*.r...4u...Jd..3k.<5"'N.4f...\...4s`.y.......?.[.0.4r...RC+.2{...1c.S$W...Z....4...AcG..8v.E3.G..@g.x.4. -memcmp() rc=0 - -v42bis_compress() rc=0 -v42bis_compress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -Mode: 2 -uncompressed_original= 450000e2b66140003706e325550d93d7c0a8000200504049fbb679bcc9051ea48018007cebea00000101080a1153cfdc002cfdb4485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343120474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338313336642d3138642d34353832306530393638303430220d0a0d0a ASCII:E....a@.7..%U........P@I..y........|.........S...,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:41 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8136d-18d-45820e0968040".... -uncompressed= 450000e2b66140003706e325550d93d7c0a8000200504049fbb679bcc9051ea48018007cebea00000101080a1153cfdc002cfdb4485454502f312e3120333034204e6f74204d6f6469666965640d0a446174653a205475652c2033302041756720323031362031363a33363a343120474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338313336642d3138642d34353832306530393638303430220d0a0d0a ASCII:E....a@.7..%U........P@I..y........|.........S...,..HTTP/1.1 304 Not Modified..Date: Tue, 30 Aug 2016 16:36:41 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8136d-18d-45820e0968040".... -compressed= 45000100e2b66140003706e325550d93d7c0a8000200504049fbb679bcc9051ea48018007cebea00000101080a1153cfdc002cfdb4485454502f312e312033013034204e6f74204d6f646966016965640d0a446174653a205475652c2033302041756720323031362031363a33363a343120474d540d0a5365727665723a204170616368650d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4b6565702d416c6976653a2074696d656f75743d322c206d61783d313030300d0a455461673a2022346338313336642d3138642d34353832306530393638303430220d0a0d0a ASCII:E.....a@.7..%U........P@I..y........|.........S...,..HTTP/1.1 3.04 Not Modif.ied..Date: Tue, 30 Aug 2016 16:36:41 GMT..Server: Apache..Connection: Keep-Alive..Keep-Alive: timeout=2, max=1000..ETag: "4c8136d-18d-45820e0968040".... -memcmp() rc=0 - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 0 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010268000700004006cefac0a80002550d93d740000050462c7ba7e4d1753a80184000aad500000101080a0001a670084dafb4474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d6978656433005ab97a052b960d59b368d5b2ddb3e60e9c372ef610b6dbf56bd8b165030f2e7cf88dd63b68f64c3d9b76ed1cb58847b490d122e8d0a24761185913d50e1aa423f0dc49036387d6d7b169e4d0cac68e1cd93b70f0804123f7eee03372dcc801038f193b306a68b5b2864d9a3b629a30b1a2b5081b35384613357a07c6133271d4e021a3064d52347182ee81b119c69c3a72d2b079b37e4409c177e6f4902163738cdd71f8a0a903d68ec21866e4c0918185087dfb329cec9831834d951a337c4a2e1174891c3badf5e8d113a38f1c336e24520c8a65751d1844d4c7696d852c1f240e992becf8918d0c9145465441939fcc6a1950a206b7e1fca38e1145eaebc129230aeb24f57bcab011c3c68829f5efe7bfcbe4c814e731668c3042f6fef93a62d9909561e4c91123c163d0085a3a4e1c3466c6c649ea048d519d5ff3a0f95ef4280c2471269e61633ee9193469de8845a3554d9fa74199c48622e7fa7dac30ac602f9af40a9ef0236a54268247cd7f923946d0a8d1c3c68d1e35788c5002e54ad0a00100 ASCII:E...h....@.......U...@..PF,{...u:..@............p.M..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed3.Z.z.+..Y.h.......7......k..e...|...;h.L=.v....G..."...Ga.Y.....#..I.c....i.......;p..A#...3r......;0jh...M.;b.0.....58F.5z...2q..!..MR4q.......:r..y.~D..w...!cs..q........f......}.2...1.M..3|J..t..;........3n$R..eu..D..im.,.$..+......EFTA...j.P........E...)#..$.{......).........1f.0B...:b...a...#.c..Z:N.4f..I...Q._...^.(.$q&.ac>..4i..E.UM..A..."..}.0.`/.....#jT&.G...9F.......5x.P..J.... -uncompressed= 45000268000700004006cefac0a80002550d93d740000050462c7ba7e4d1753a80184000aad500000101080a0001a670084dafb4474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a49662d4d6f6469666965642d53696e63653a205475652c2032332041756720323031362031323a33343a323920474d540d0a0d0a ASCII:E..h....@.......U...@..PF,{...u:..@............p.M..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..If-Modified-Since: Tue, 23 Aug 2016 12:34:29 GMT.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 1 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010268000900004006cef8c0a80002550d93d740000050462c7ba7e4d1753a801840007e7f00000101080a0001d1cc084db0ae474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d6978656433005ab97a052b960d59b368d5b2ddb3e60e9c372ef610b6dbf56bd8b165030f2e7cf88dd63b68f64c3d9b76ed1cb58847b490d122e8d0a24761185913d50e1aa423f0dc49036387d6d7b169e4d0cac68e1cd93b70f0804123f7eee03372dcc801038f193b306a68b5b2864d9a3b629a30b1a2b5081b35384613357a07c6133271d4e021a3064d52347182ee81b119c69c3a72d2b079b37e4409c177e6f4902163738cdd71f8a0a903d68ec21866e4c0918185087dfb329cec9831834d951a337c4a2e1174891c3badf5e8d113a38f1c336e24520c8a65751d1844d4c7696d852c1f240e992becf8918d0c9145465441939fcc6a1950a206b7e1fca38e1145eaebc129230aeb24f57bcab011c3c68829f5efe7bfcbe4c814e731668c3042f6fef93a62d9909561e4c91123c163d0085a3a4e1c3466c6c649ea048d519d5ff3a0f95ef4280c2471269e61633ee9193469de8845a3554d9fa74199c48622e7fa7dac30ac602f9af40a9ef0236a54268247cd7f923946d0a8d1c3c68d1e35788c5002e54ad0a00100 ASCII:E...h....@.......U...@..PF,{...u:..@.~............M..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed3.Z.z.+..Y.h.......7......k..e...|...;h.L=.v....G..."...Ga.Y.....#..I.c....i.......;p..A#...3r......;0jh...M.;b.0.....58F.5z...2q..!..MR4q.......:r..y.~D..w...!cs..q........f......}.2...1.M..3|J..t..;........3n$R..eu..D..im.,.$..+......EFTA...j.P........E...)#..$.{......).........1f.0B...:b...a...#.c..Z:N.4f..I...Q._...^.(.$q&.ac>..4i..E.UM..A..."..}.0.`/.....#jT&.G...9F.......5x.P..J.... -uncompressed= 45000268000900004006cef8c0a80002550d93d740000050462c7ba7e4d1753a801840007e7f00000101080a0001d1cc084db0ae474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a49662d4d6f6469666965642d53696e63653a205475652c2032332041756720323031362031323a33343a323920474d540d0a0d0a ASCII:E..h....@.......U...@..PF,{...u:..@.~............M..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..If-Modified-Since: Tue, 23 Aug 2016 12:34:29 GMT.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 2 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010268000b00004006cef6c0a80002550d93d740000050462c7ba7e4d1753b80193fff131c00000101080a00022884084dc558474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d6978656433005ab97a052b960d59b368d5b2ddb3e60e9c372ef610b6dbf56bd8b165030f2e7cf88dd63b68f64c3d9b76ed1cb58847b490d122e8d0a24761185913d50e1aa423f0dc49036387d6d7b169e4d0cac68e1cd93b70f0804123f7eee03372dcc801038f193b306a68b5b2864d9a3b629a30b1a2b5081b35384613357a07c6133271d4e021a3064d52347182ee81b119c69c3a72d2b079b37e4409c177e6f4902163738cdd71f8a0a903d68ec21866e4c0918185087dfb329cec9831834d951a337c4a2e1174891c3badf5e8d113a38f1c336e24520c8a65751d1844d4c7696d852c1f240e992be4e8918d8c9045465441939fcc6a1950a206b7e1dca38e1145eaebb929230aeb24f579cab011c3c68829f5efe7afcbe4c814e731668c3042f6fef93a62d9909561e4c91123c163d0084a3a4e1c3466c6c649ea048dd19c5ff3a0f95ef4280c2471269e61633ee9193469de8845a3554d9fa74199c48622c7fa7dac30ac5c2f9af40a1ef0236a502682478dff913946d0a8d1c3c68d1e35788c5002e54ad0a00100 ASCII:E...h....@.......U...@..PF,{...u;..?...........(..M.XGET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed3.Z.z.+..Y.h.......7......k..e...|...;h.L=.v....G..."...Ga.Y.....#..I.c....i.......;p..A#...3r......;0jh...M.;b.0.....58F.5z...2q..!..MR4q.......:r..y.~D..w...!cs..q........f......}.2...1.M..3|J..t..;........3n$R..eu..D..im.,.$..+......EFTA...j.P........E...)#..$.y......).........1f.0B...:b...a...#.c..J:N.4f..I....._...^.(.$q&.ac>..4i..E.UM..A..."..}.0.\/.....#jP&.G...9F.......5x.P..J.... -uncompressed= 45000268000b00004006cef6c0a80002550d93d740000050462c7ba7e4d1753b80193fff131c00000101080a00022884084dc558474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a49662d4d6f6469666965642d53696e63653a205475652c2032332041756720323031362031323a33343a323920474d540d0a0d0a ASCII:E..h....@.......U...@..PF,{...u;..?...........(..M.XGET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..If-Modified-Since: Tue, 23 Aug 2016 12:34:29 GMT.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 3 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010268000c00004006cef5c0a80002550d93d740000050462c7ba7e4d1753b80193fff65ab00000101080a0002d5f4084dc558474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d6978656433005ab97a052b960d59b368d5b2ddb3e60e9c372ef610b6dbf56bd8b165030f2e7cf88dd63b68f64c3d9b76ed1cb58847b490d122e8d0a24761185913d50e1aa423f0dc49036387d6d7b169e4d0cac68e1cd93b70f0804123f7eee03372dcc801038f193b306a68b5b2864d9a3b629a30b1a2b5081b35384613357a07c6133271d4e021a3064d52347182ee81b119c69c3a72d2b079b37e4409c177e6f4902163738cdd71f8a0a903d68ec21866e4c0918185087dfb329cec9831834d951a337c4a2e1174891c3badf5e8d113a38f1c336e24520c8a65751d1844d4c7696d852c1f240e992be4e8918d8c9045465441939fcc6a1950a206b7e1dca38e1145eaebb929230aeb24f579cab011c3c68829f5efe7afcbe4c814e731668c3042f6fef93a62d9909561e4c91123c163d0084a3a4e1c3466c6c649ea048dd19c5ff3a0f95ef4280c2471269e61633ee9193469de8845a3554d9fa74199c48622c7fa7dac30ac5c2f9af40a1ef0236a502682478dff913946d0a8d1c3c68d1e35788c5002e54ad0a00100 ASCII:E...h....@.......U...@..PF,{...u;..?.e............M.XGET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed3.Z.z.+..Y.h.......7......k..e...|...;h.L=.v....G..."...Ga.Y.....#..I.c....i.......;p..A#...3r......;0jh...M.;b.0.....58F.5z...2q..!..MR4q.......:r..y.~D..w...!cs..q........f......}.2...1.M..3|J..t..;........3n$R..eu..D..im.,.$..+......EFTA...j.P........E...)#..$.y......).........1f.0B...:b...a...#.c..J:N.4f..I....._...^.(.$q&.ac>..4i..E.UM..A..."..}.0.\/.....#jP&.G...9F.......5x.P..J.... -uncompressed= 45000268000c00004006cef5c0a80002550d93d740000050462c7ba7e4d1753b80193fff65ab00000101080a0002d5f4084dc558474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a49662d4d6f6469666965642d53696e63653a205475652c2032332041756720323031362031323a33343a323920474d540d0a0d0a ASCII:E..h....@.......U...@..PF,{...u;..?.e............M.XGET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..If-Modified-Since: Tue, 23 Aug 2016 12:34:29 GMT.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 4 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 450001022d000f00004006ac5ec0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e33005cbd8215bb67cd1d386f5cecd1cb766ad5ab59b7decdbbb7ef1ba877d0ec49daf56bd83960fd8e6821a3c5cd9c3b7bc230b2e6a81d343e47e0b99306c60ea8a54fd3c801958d1d39a877e0e00183c6ebd8b767e4b89103061e337660d4806a650d9b3477c4346162056a11366a7064d6c9f30e8c2764e2a8c143460d9a9f68e2dcdc0323328c3975e4a461f326fc881278efcce9214346e418b1e3f04153c7aa9dfd31ccc88123030b11f5ec6538d93163069b2a3566d0445ce2e612397646d398118347cd9a3a68f49848f12696d0756010011f67b415ad7c90fc17be5f224536322e16195105cd7b32a16540397adb06718a3a461459afe7a58c28a293acb729c3460c1b23a6ac6ffffe2d93235388c79831c288d6f6ddeb6065a355869127478cdcae79b3739c3868cc648df3d3091a9e31abe641537d674f1848e2203cc386fbcf3368d2bcc18a06aa9a3e456fde0c00 ASCII:E...-....@..^........@..@F.......P.@..H..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application3.\....g..8o\...vj..Y........w..I..k.9`..h!....;{.0....4>G........O......9.w........g......3v`..je..4w.4ab.j.6jpd.....'d...CF...h....#2.9u..a.&...x...!CF.....AS....1...#.....e8.1c..*5f.D\...9vF....G..:h..H.&..u`...g...|...._"E62...Q..{2.e@9z..q.:F.Y....(....).F..#..o..-.#S...1......`e.U..'G...y.s.8h.d......1..AS}gO.H. <....3h.......>Eo... -uncompressed= 4500022d000f00004006ac5ec0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a2031302e392e312e3137313a383030300d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a0d0a ASCII:E..-....@..^........@..@F.......P.@..H..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: 10.9.1.171:8000..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 5 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 450001022d001000004006ac5dc0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e33005cbd8215bb67cd1d386f5cecd1cb766ad5ab59b7decdbbb7ef1ba877d0ec49daf56bd83960fd8e6821a3c5cd9c3b7bc230b2e6a81d343e47e0b99306c60ea8a54fd3c801958d1d39a877e0e00183c6ebd8b767e4b89103061e337660d4806a650d9b3477c4346162056a11366a7064d6c9f30e8c2764e2a8c143460d9a9f68e2dcdc0323328c3975e4a461f326fc881278efcce9214346e418b1e3f04153c7aa9dfd31ccc88123030b11f5ec6538d93163069b2a3566d0445ce2e612397646d398118347cd9a3a68f49848f12696d0756010011f67b415ad7c90fc17be5f224536322e16195105cd7b32a16540397adb06718a3a461459afe7a58c28a293acb729c3460c1b23a6ac6ffffe2d93235388c79831c288d6f6ddeb6065a355869127478cdcae79b3739c3868cc648df3d3091a9e31abe641537d674f1848e2203cc386fbcf3368d2bcc18a06aa9a3e456fde0c00 ASCII:E...-....@..]........@..@F.......P.@..H..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application3.\....g..8o\...vj..Y........w..I..k.9`..h!....;{.0....4>G........O......9.w........g......3v`..je..4w.4ab.j.6jpd.....'d...CF...h....#2.9u..a.&...x...!CF.....AS....1...#.....e8.1c..*5f.D\...9vF....G..:h..H.&..u`...g...|...._"E62...Q..{2.e@9z..q.:F.Y....(....).F..#..o..-.#S...1......`e.U..'G...y.s.8h.d......1..AS}gO.H. <....3h.......>Eo... -uncompressed= 4500022d001000004006ac5dc0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a2031302e392e312e3137313a383030300d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a0d0a ASCII:E..-....@..]........@..@F.......P.@..H..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: 10.9.1.171:8000..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 6 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 450001022d001100004006ac5cc0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e33005cbd8215bb67cd1d386f5cecd1cb766ad5ab59b7decdbbb7ef1ba877d0ec49daf56bd83960fd8e6821a3c5cd9c3b7bc230b2e6a81d343e47e0b99306c60ea8a54fd3c801958d1d39a877e0e00183c6ebd8b767e4b89103061e337660d4806a650d9b3477c4346162056a11366a7064d6c9f30e8c2764e2a8c143460d9a9f68e2dcdc0323328c3975e4a461f326fc881278efcce9214346e418b1e3f04153c7aa9dfd31ccc88123030b11f5ec6538d93163069b2a3566d0445ce2e612397646d398118347cd9a3a68f49848f12696d0756010011f67b415ad7c90fc17be5f224536322e16195105cd7b32a16540397adb06718a3a461459afe7a58c28a293acb729c3460c1b23a6ac6ffffe2d93235388c79831c288d6f6ddeb6065a355869127478cdcae79b3739c3868cc648df3d3091a9e31abe641537d674f1848e2203cc386fbcf3368d2bcc18a06aa9a3e456fde0c00 ASCII:E...-....@..\........@..@F.......P.@..H..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application3.\....g..8o\...vj..Y........w..I..k.9`..h!....;{.0....4>G........O......9.w........g......3v`..je..4w.4ab.j.6jpd.....'d...CF...h....#2.9u..a.&...x...!CF.....AS....1...#.....e8.1c..*5f.D\...9vF....G..:h..H.&..u`...g...|...._"E62...Q..{2.e@9z..q.:F.Y....(....).F..#..o..-.#S...1......`e.U..'G...y.s.8h.d......1..AS}gO.H. <....3h.......>Eo... -uncompressed= 4500022d001100004006ac5cc0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a2031302e392e312e3137313a383030300d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a0d0a ASCII:E..-....@..\........@..@F.......P.@..H..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: 10.9.1.171:8000..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 7 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 450001022d001200004006ac5bc0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e33005cbd8215bb67cd1d386f5cecd1cb766ad5ab59b7decdbbb7ef1ba877d0ec49daf56bd83960fd8e6821a3c5cd9c3b7bc230b2e6a81d343e47e0b99306c60ea8a54fd3c801958d1d39a877e0e00183c6ebd8b767e4b89103061e337660d4806a650d9b3477c4346162056a11366a7064d6c9f30e8c2764e2a8c143460d9a9f68e2dcdc0323328c3975e4a461f326fc881278efcce9214346e418b1e3f04153c7aa9dfd31ccc88123030b11f5ec6538d93163069b2a3566d0445ce2e612397646d398118347cd9a3a68f49848f12696d0756010011f67b415ad7c90fc17be5f224536322e16195105cd7b32a16540397adb06718a3a461459afe7a58c28a293acb729c3460c1b23a6ac6ffffe2d93235388c79831c288d6f6ddeb6065a355869127478cdcae79b3739c3868cc648df3d3091a9e31abe641537d674f1848e2203cc386fbcf3368d2bcc18a06aa9a3e456fde0c00 ASCII:E...-....@..[........@..@F.......P.@..H..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application3.\....g..8o\...vj..Y........w..I..k.9`..h!....;{.0....4>G........O......9.w........g......3v`..je..4w.4ab.j.6jpd.....'d...CF...h....#2.9u..a.&...x...!CF.....AS....1...#.....e8.1c..*5f.D\...9vF....G..:h..H.&..u`...g...|...._"E62...Q..{2.e@9z..q.:F.Y....(....).F..#..o..-.#S...1......`e.U..'G...y.s.8h.d......1..AS}gO.H. <....3h.......>Eo... -uncompressed= 4500022d001200004006ac5bc0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a2031302e392e312e3137313a383030300d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a0d0a ASCII:E..-....@..[........@..@F.......P.@..H..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: 10.9.1.171:8000..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 8 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010268001300004006ceeec0a80002550d93d740000050462c7ba7e4d1753b80193fff7b4a00000101080a0003c054084dc558474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d6978656433005bbb7e0d3b964dd9b369d7b6ddb3e60e9c372ef614beeb15ac58b2660513368cf8cdd63b68f65045ab96ed9cb58947b490d1422851a34861185923d50e9aa423f0dc490363c756d8b269e4d8cac68e9cd93b70f0804143376fe13372dcc801038f193b306a6cb5b2864d9a3b629a30b1b2b5081b353848173d7a07c6133271d4e021a3068d52347184ee81c119c69c3a72d2b079c37e4489c177e6f4902183730cde71f8a0a913d6cec21866e4c091818548fdfb329cec9831834d951a337e4e2e2174891c3baef5e8d113a38f1c336e2656148a85751d1844d6c7716da52c1f240f9b2fecf8918d0c9145465441a39f0c6b1950a40ab7f1fca38e1145ecebc129234aeb24f67bcab011c3c68829f6f1ebb7cbe4c894e731668c3052163ffa3a63d9949561e4c91123c263d0105a3a4e1c3466c8c651ea04cd519d60f3a0016f14290c2471289e61735ee9193469de8c45b3554d1fa84299c88622e73afeac30ac6037aaf40a9ef0236a54268247cd7f923946d0a8d1c3c68d1e35788c5002e58a50a10100 ASCII:E...h....@.......U...@..PF,{...u;..?.{J.........T.M.XGET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed3.[.~.;.M..i.......7.......X.f..6....;h.PE......G...B(Q.Ha.Y#....#..I.c.V..i.......;p..AC7o.3r......;0jl...M.;b.0.....58H.=z...2q..!...R4q.......:r..y.~D..w...!.s..q........f.....H..2...1.M..3~N.!t..;........3n&V...u..D..qm.,.$../......EFTA...k.P........E...)#J.$.{......).........1f.0R.?.:c...a...#.c..Z:N.4f..Q...Q.`...o.).$q(.as^..4i..E.UM..B...".:..0.`7.....#jT&.G...9F.......5x.P...P... -uncompressed= 45000268001300004006ceeec0a80002550d93d740000050462c7ba7e4d1753b80193fff7b4a00000101080a0003c054084dc558474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a49662d4d6f6469666965642d53696e63653a205475652c2032332041756720323031362031323a33343a323920474d540d0a0d0a ASCII:E..h....@.......U...@..PF,{...u;..?.{J.........T.M.XGET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..If-Modified-Since: Tue, 23 Aug 2016 12:34:29 GMT.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 9 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 450001022d001400004006ac59c0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e33005cbd8215bb67cd1d386f5cecd1cb766ad5ab59b7decdbbb7ef1ba877d0ec49daf56bd83960fd8e6821a3c5cd9c3b7bc230b2e6a81d343e47e0b99306c60ea8a54fd3c801958d1d39a877e0e00183c6ebd8b767e4b89103061e337660d4806a650d9b3477c4346162056a11366a7064d6c9f30e8c2764e2a8c143460d9a9f68e2dcdc0323328c3975e4a461f326fc881278efcce9214346e418b1e3f04153c7aa9dfd31ccc88123030b11f5ec6538d93163069b2a3566d0445ce2e612397646d398118347cd9a3a68f49848f12696d0756010011f67b415ad7c90fc17be5f224536322e16195105cd7b32a16540397adb06718a3a461459afe7a58c28a293acb729c3460c1b23a6ac6ffffe2d93235388c79831c288d6f6ddeb6065a355869127478cdcae79b3739c3868cc648df3d3091a9e31abe641537d674f1848e2203cc386fbcf3368d2bcc18a06aa9a3e456fde0c00 ASCII:E...-....@..Y........@..@F.......P.@..H..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application3.\....g..8o\...vj..Y........w..I..k.9`..h!....;{.0....4>G........O......9.w........g......3v`..je..4w.4ab.j.6jpd.....'d...CF...h....#2.9u..a.&...x...!CF.....AS....1...#.....e8.1c..*5f.D\...9vF....G..:h..H.&..u`...g...|...._"E62...Q..{2.e@9z..q.:F.Y....(....).F..#..o..-.#S...1......`e.U..'G...y.s.8h.d......1..AS}gO.H. <....3h.......>Eo... -uncompressed= 4500022d001400004006ac59c0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a2031302e392e312e3137313a383030300d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a0d0a ASCII:E..-....@..Y........@..@F.......P.@..H..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: 10.9.1.171:8000..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 10 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 450001022d001500004006ac58c0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e33005cbd8215bb67cd1d386f5cecd1cb766ad5ab59b7decdbbb7ef1ba877d0ec49daf56bd83960fd8e6821a3c5cd9c3b7bc230b2e6a81d343e47e0b99306c60ea8a54fd3c801958d1d39a877e0e00183c6ebd8b767e4b89103061e337660d4806a650d9b3477c4346162056a11366a7064d6c9f30e8c2764e2a8c143460d9a9f68e2dcdc0323328c3975e4a461f326fc881278efcce9214346e418b1e3f04153c7aa9dfd31ccc88123030b11f5ec6538d93163069b2a3566d0445ce2e612397646d398118347cd9a3a68f49848f12696d0756010011f67b415ad7c90fc17be5f224536322e16195105cd7b32a16540397adb06718a3a461459afe7a58c28a293acb729c3460c1b23a6ac6ffffe2d93235388c79831c288d6f6ddeb6065a355869127478cdcae79b3739c3868cc648df3d3091a9e31abe641537d674f1848e2203cc386fbcf3368d2bcc18a06aa9a3e456fde0c00 ASCII:E...-....@..X........@..@F.......P.@..H..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application3.\....g..8o\...vj..Y........w..I..k.9`..h!....;{.0....4>G........O......9.w........g......3v`..je..4w.4ab.j.6jpd.....'d...CF...h....#2.9u..a.&...x...!CF.....AS....1...#.....e8.1c..*5f.D\...9vF....G..:h..H.&..u`...g...|...._"E62...Q..{2.e@9z..q.:F.Y....(....).F..#..o..-.#S...1......`e.U..'G...y.s.8h.d......1..AS}gO.H. <....3h.......>Eo... -uncompressed= 4500022d001500004006ac58c0a800020a0901ab40011f4046a2f5a8e0a618025018400093480000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a2031302e392e312e3137313a383030300d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a0d0a ASCII:E..-....@..X........@..@F.......P.@..H..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: 10.9.1.171:8000..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 11 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010239000500004006ac5cc0a800020a0901ab40001f90c286afa741a348cb801840007fcb0000050a41a348dc41a34a440000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d69786564330057b36eedfa954dd8b165cfa6ddb3e60e9c372ef6049eab95ab57b062fd02164cf8cdd53b68f640256b16ed9cb38547b490d1e22791a043efc030b2c6a91d344547e0b99306c68eabad5fd3c871958d1d39b077e0e00183c6eddcbf67e4b89103061e337660d4b86a650d9b3477c4346162e56a11366a7080164d14c6133271d4e021a3068d5134717eee818119c69c3a72d2b079837e4489bf77e6f4902103738cdc71f8a0a9d3d58ec11866e4c091818548fcf9329cec9831834d951a33783e2ef173891c3bab69cc88c1a3674f1d347a6cdcf8134bea3a30889c8fb3da4a583e48162a37a891231b19208b8ca882c63e99d432a038fd6d8339471d238ac8d793534614d549e40b956123868d1153e4d3b77f97c99129cc63cc1861242c7df275beb2092bc3c89323467ef7fc693a4e1c3466c0c631ea04cdd09d5cf3a0e96e66e81d1848e2403cc366bcd13368d2bcf98ae6aa9a3e4c7ffe0c00 ASCII:E...9....@..\........@.......A.H...@.......A.H.A.JD..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed3.W.n...M..e.......7.......W.b...L...;h.@%k.....G....'..C..0....4EG........_..q...9.w........g......3v`..je..4w.4ab.j.6jp..M...2q..!...Q4q~......:r..y.~D..w...!.s..q........f.....H..2...1.M..3x>..s..;.i....gO.4zl...K.:0.....JX>H.*7..#.. .....>..2.8.m.9G.#....SF..I...a#...S.......).c..a$,}.u...+...#F~..i:N.4f..1.....\...nf...H.@<.f..3h.......>L.... -uncompressed= 45000239000500004006ac5cc0a800020a0901ab40001f90c286afa741a348cb801840007fcb0000050a41a348dc41a34a440000474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a2031302e392e312e3137313a383038300d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a0d0a ASCII:E..9....@..\........@.......A.H...@.......A.H.A.JD..GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: 10.9.1.171:8080..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 12 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 450001025b000a00004006ac35c0a800020a0901ab40011f90c293b0a8af5e58be5018400072a60000474554202f72656470686f6e652e706e6720485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c33005cbd82154b368e59b46ad9ee597307ce1b177b066fedfa35ec583665010b266cf8cdd63b68f6543d9b76ed1cb58747b490d16268d1a34961185933d50e1aa523f0dc490363c7d6d7b169e4d8cac68e1cd93b70f0804123f7eee03372dcc801038f193b306a6cb5b2864d9a3b629a30b1b2b5081b3538461b457a07c6133238f190518366299a3843f7c0d80c634e1d3969d8bc513fa244e03b737ac890b139c6ee387cd0d4096b07610c3372e0c8c042647e7d194e76cc98c1a64a8d1940259718ba448e9dd63466c4e01134a80e1a3d38721c8a65751d1844d2c7696d65261f240d9923dcd8918d0c9045465441839fcc6a1950a606b7e1bca38e1145e8ebd929230aeb24f485cab011c3c68829f4ede3d7cbe4c814e731668c3032d3be1a3c75c6b2296be4c91123c1830e451d270e1a3364e32c758206694fb079d07c3f9a1406923812cfb0c1b9f40c9a346fc6a2d9aaa64fd4a175d33064b894bfff812b5bc2a421b3e60c8e32860e0d00 ASCII:E...[....@..5........@........^X.P.@.r...GET /redphone.png HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed,3.\...K6.Y.j..Ys....{.o..5.X6e..&l...;h.T=.v....G...bh..Ia.Y3....#..I.c....i.......;p..A#...3r......;0jl...M.;b.0.....58F.Ez...28..Q.f).8C....cN.9i..Q?.D.;sz...9..8|...k.a.3r...Bd~}.Nv....J..@%...D...4f...4...=8r..eu..D..ime&.$..#......EFTA...j.P........E...)#..$........).........1f.02.......;h.TM......G...bh..Ia.Y3....#..I.c....i.......;p..Acw..3r......;0jp...M.;b.0.....58J.Ez...2q..!...R4q.......:r..y.~D..w...!.s..q...#....f......}.2...1.M..3.R.1t..;........3n(Z...u..D..ym.,.$..3......EFTA..Lk.P........E...)#..$.}......).........1f.0b6..:d...a...#.c..j:N.4f..Y.....a....4).$q*.a.~..4i..E.UM..C... -uncompressed= 45000236003000004006cf03c0a80002550d93d740020050c30e84a9441d06ac80184000c2f400000101080a00052df410fc31bd474554202f20485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a0d0a ASCII:E..6.0..@.......U...@..P....D.....@...........-...1.GET / HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 15 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010260004500004006cec4c0a80002550d93d740030050c3134faac89c8b2980184000578d00000101080a000535c010fc34c8474554202f6e697276616e612e63737320485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d33006fcede41b3072c5dbb78e7dcad3ca2858c164ea14aa50ac3c81aaf76d0541d81e74e1a183bcef2f64d23c7593676e4fcde8183070c1ac6913b9f91e3460e187884c2a871d6ca1a3669ee8869c2c4cad9226cd4e0801d75ea1d184f7caac143460d1aab68e238dd0303358c3975e4a461f3c6fe88128fefcce9214306ea18c8e3f04153a7edd0b841e5c0918185c87f83329cec9831834d951a33967e2ee174891c3bbaf5e8d113a38f1c336e3ac2718a05771d1844eac7d16d252e1f241985563489928d8c954546544193900c6e1950bc3ab7a11da58e11450aea292a234aee240595cab011c3c68829050f2624cce4c814ed31668c3012f7a0fc3a6fd9c49561e4c91123ce63d0702a3b4e1c3466e0c6b1ea04cdd4a36cf3a0592f952a0c2471ccc839c3268e1aab67d0a479f316cd59357db83af59b062346ab0d1f46b47933e7ce9e329c3a0d00 ASCII:E...`.E..@.......U...@..P..O....)..@.W.........5...4.GET /nirvana.css HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xm3.o..A..,].x...<....N.J......v.T...N..;...M#.Y6v..........;...F..x...q...6i..i...."l....u...O|..CF...h.8...5.9u..a.........!C......AS....A........2...1.M..3.~..t..;........3n:.q..w..D...m%..$..V4.....EFTA...n.P.:......E..)*#J.$........)..&$.....1f.0....:o...a...#.c.p*;N.4f........l..Y/.*.$q..9.&...g..y...Y5}.:...#F...F.y3...2.:.. -uncompressed= 45000260004500004006cec4c0a80002550d93d740030050c3134faac89c8b2980184000578d00000101080a000535c010fc34c8474554202f6e697276616e612e63737320485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a526566657265723a20687474703a2f2f7777772e7a6f636b2e636f6d2f0d0a0d0a ASCII:E..`.E..@.......U...@..P..O....)..@.W.........5...4.GET /nirvana.css HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..Referer: http://www.zock.com/.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 16 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010264004600004006cebfc0a80002550d93d740040050c3135bab2189da61801840008f2d00000101080a000535c410fc34dc474554202f382d4269742f4c6162656c2e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d3300952fbf517b07cd1e9f77f3ee9da317f38816325a48a56a152b0c236bc4da419375049e3b6960ec50fb3b388d1c6ad9d891237c070e1e3068245f1e7d468e1b3960e0316307460db556d6b04973474c132656d4f254836376d5ab7760008da3060f193568b4a28923750f8cd530e6d4919386cd9bfc234a48be33a7870c19ab632c8fc3074d1db87630c63023078e0c2c440c2294e164c78c196caad498f1547409a94be4d8e9ad478f9e187de498710352a4542cbbebc020823f4e6f2b74f920e1c81da34a966c64bc2c32a20a1a866476cb802236ba0def2c758c2872500f521951782739d854868d1836464c39a89061612647a6788f31638411ba0aebd791cb86ae0c234f8e18891e838654da71e2a03133378e562768ae2a7d9b078d7bab5861208913f20c1bfa5acfa049f3462e1ab56afa80950a38cdc68d5a214aa4a873e74fa144474a951a00 ASCII:E...d.F..@.......U...@..P..[.!..a..@..-........5...4.GET /8-Bit/Label.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtm3../.Q{....w........2ZH.j.+.#k..A.u..;i`.P.;8..j...#|...0h$_.}F..9`.1c.F..V..IsGL.&V..T.cv..w`......5h...#u...0........#JH.3.....c,...M..v0.0#...,D."..d...l....Tt..K....G...}..q.R.T,... .?No+t. ....J.ld.,2....dv.."6...,u.(rP.R.Qx'9.T...6FL9..aa&G.x.1c...........#O......T.q..137.V'h.*}...{.Xa ......Z..I.F...j....8...Z!J..s.O.DGJ... -uncompressed= 45000264004600004006cebfc0a80002550d93d740040050c3135bab2189da61801840008f2d00000101080a000535c410fc34dc474554202f382d4269742f4c6162656c2e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a526566657265723a20687474703a2f2f7777772e7a6f636b2e636f6d2f0d0a0d0a ASCII:E..d.F..@.......U...@..P..[.!..a..@..-........5...4.GET /8-Bit/Label.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..Referer: http://www.zock.com/.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 17 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010264005800004006ceadc0a80002550d93d740050050c31389acaf7b26538018400075c900000101080a000537d010fc354a474554202f382d4269742f41636f726e2e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d3300942dbf497b07cd1e9f76f1ea9d93f7f28816325a48a56af50e0c236bc2da418375049e3b6960ec48eb1b388d1c69d9d891137c070e1e306820570e7d468e1b3960e0316307468db456d6b04973474c132656d2f2548343b699aa57613c2113470d1e326ad064451347ea1e18aa61cca923270d9b37f94794887c674e0f193254c7501e870f9a3a6fed608c11148e0c2c440c2294e164c78c196caad498f1347409a94be4d8e1ad478f9e187de4987103520e1ca95874d78141047f1cde56e6f241c2713bc6942bd9c87059644415340cc9e89601252c741bdd57ea1851e4a09ea432a2ec4e72d0a90c1b316c8c9872502143c34c8e4ce91e63c608237315d6af1397cd5c19469e1c31023d060da9b4e3c44163466e9cac4ed0585dea360f9af6efefc0401227e81936f4b39e4193e64d5c3469d5f4f92a15709a8d1bb342944831a7ce9e42898a942a3500 ASCII:E...d.X..@.......U...@..P.....{&S..@.u.........7...5JGET /8-Bit/Acorn.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtm3..-.I{....v........2ZH.j...#k..A.u..;i`.H..8..i....|...0h W.}F..9`.1c.F..V..IsGL.&V..T.C...Wa#...0......Z+k...#...+kw..A.*.;0.......5h...3u...0........#JP.3.....c0...M..v6.0#...,D.2..d...l.....t..K....G...}..q3..T,... .?.o+u. ..}c..ld.,2....dx..2V.../u.(.P.S.Qz'Q(U...6FLQ..ab&G.|.1c...........#O........q..1C7.V'h.:......Ya .C....[..I.f...j...:8.G.['V....P.HMN... -uncompressed= 45000266007600004006ce8dc0a80002550d93d740060050c31431ada11fa06780184000f08e00000101080a00053b3c10fc35ef474554202f382d4269742f416d73747261642e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a526566657265723a20687474703a2f2f7777772e7a6f636b2e636f6d2f0d0a0d0a ASCII:E..f.v..@.......U...@..P..1....g..@...........;<..5.GET /8-Bit/Amstrad.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..Referer: http://www.zock.com/.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 19 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010264007700004006ce8ec0a80002550d93d740040050c3135ddb2189e0108018400060d600000101080a00053b4010fc35e7474554202f382d4269742f41746172692e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d3300932bbf497b07cd1e9f76f1ea9d93d7f28816325a48a56a152b0c236b84da419375049e3b6960ec48dbfb378d1c69d9d891037c070e1e30681c4ffe7c468e1b3960e0316307468db456d6b04973474c132656d2f254832376d5ab77603c2113470d1e326ad068451347ea1e18a961cca923270d9b37f84794807c674e0f193252c7481e870f9aa1da2fc63023078e0c2c440a1e94e164c78c196caad498f1147409a94be4d8d9ad478f9e187de49871e311a4542cb9ebc020723fce6e2b73f920d968e7224a956c64b42c32a20a9a856472cb8022f4b90dee2a758c286250cf511951742731c854868d1836464c31887061612647a6708f31638491b908e9d789cb66ae0c234f8e18791e8386d4d971e2a03123378e562768ae26759b070d7bab58612089f3f10c9bf95acfa049f3262e9ab46afa8095fa378d468d5a1f469c8833e7ce9f41434a951a00 ASCII:E...d.w..@.......U...@..P..].!.....@.`.........;@..5.GET /8-Bit/Atari.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtm3..+.I{....v........2ZH.j.+.#k..A.u..;i`.H..7..i....|...0h.O.|F..9`.1c.F..V..IsGL.&V..T.#v..w`4..6.GET /8-Bit/Apple.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtm3..-.Q{....v........2ZH.j.+.#k..A.u..;i`.P..7..j....|...0h.O.|F..9`.1c.F..V..IsGL.&V..T.#v..w`4..6.GET /8-Bit/Apple.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..Referer: http://www.zock.com/.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 21 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010265007d00004006ce87c0a80002550d93d740050050c3138bdcaf7b296780183cec0de600000101080a00053e3410fc368e474554202f382d4269742f447261676f6e2e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d33009631bf597b07cd1e9f8df5f2d59379440b192da656bd9a1586913563eda0d13a02cf9d343076ac052e9c468eb56cecc819be03070f18349433973e23c78d1c30f098b103a3c65a2b6bd8a4b923a609132b6b79aac141db2ad63b309e9089a3068f50345bd1c499ba07c6631873eac849c3e68dfe112526df99d343868cc73198c7e183a64e5c3b1963989103470616220715ca70b263c60c36556acc804abac4d42572ecf8d6a3474f8c3e72ccb80939722a16de75601051c3dfb715a27c9074ec9e71654b363260161951054d4332bc6540192bddc6f7963a461441a847a98c28bd93208ce3d3460c1b23a6205cd89030932353bec79831c208d185f7ebcc6553d7c8932346a4c7a03175769c3868ccd08db3d5091aac4ce1e641f3fe6a561848e2883cc3c6fed63368d2bc998b66ad9a3e61a7fe4dc391e3d688132beeec0974a8519253a70600 ASCII:E...e.}..@.......U...@..P.....{)g..<...........>4..6.GET /8-Bit/Dragon.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtm3..1.Y{.........yD..-.V.....5c...:...40v....F..l........4.3.>#...0......Z+k...#...+ky..A.*.;0......P4[......c.s..I.....%&...C...1.....N\;.c...G.."...p.c..6Uj..J...%r....GO.>r...9r*..u`.Q.....|.t..qeK62`..Q.MC2.e@.+....:F.A.G..(.. ...F..#. \..0.#S...1.......eS...#F...1uv.8h........L..A..jV.H..<....3h....f..>a..M......+...t.Q.S... -uncompressed= 45000265007d00004006ce87c0a80002550d93d740050050c3138bdcaf7b296780183cec0de600000101080a00053e3410fc368e474554202f382d4269742f447261676f6e2e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a526566657265723a20687474703a2f2f7777772e7a6f636b2e636f6d2f0d0a0d0a ASCII:E..e.}..@.......U...@..P.....{)g..<...........>4..6.GET /8-Bit/Dragon.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..Referer: http://www.zock.com/.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 22 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010269008000004006ce80c0a80002550d93d740060050c3143301dfa11fa3de80183c892b5d00000101080a0005412c10fc3761474554202f382d4269742f456e74657270726973652e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f6600952f67defcc66dd03d3df7f6fd3bc72fe7112d64b4b08a552b571846d6983dda75049e3b6960ec701b7c388d1c6e8dca21be03070f183496db694e63468e1b3960e0316307460db756d6b04973474c132656dcee5483c376d6ad77603c2113470d1e326ad0784513c7ea1e18ae6110959386cd1bfe234a58be33a7870c19ae63548fc347285d3b1b63989103470616220ad3c870b263c60c36556acc986aba84d52572ecfcd6a3474f8c3e72ccb81149d22a96a3756010d91fe7b715bc7c90d4f9b891a54b36326216195105cd4332476540312bdd0678973a4614a923478f531951d0dc49d299aa0c1b316c8c98d2b9e143c64c8e4c011f63c60823781be2af63970d5e19469e1c31223d060dabbce3c44163e66e1caf4ed06c853a370f1af85ab9c2401267e41936f7bd9e4193e68d5d346ed5f4216bd5701aa142bd4eac78d1e7cfa1489596b46a3500 ASCII:E...i....@.......U...@..P..3........<.+]........A,..7aGET /8-Bit/Enterprise.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/f../g...m.==...;./..-d...U+W.F..=.u..;i`.p.|8..n..!.....4..iNcF..9`.1c.F..V..IsGL.&V..T..v..w`r...I.*..u`.......|......K62b..Q..C2Ge@1+..x.:F..#G.S.Q..I.....1l.....C.L.L..c..#x...c..^.F..1"=......Ac.n..N.l.:7...Z..@.g..6...A...]4n..!k.p..B.N.x....H...j5. -uncompressed= 45000269008000004006ce80c0a80002550d93d740060050c31433dfa11fa3de80183c892b5d00000101080a0005412c10fc3761474554202f382d4269742f456e74657270726973652e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a526566657265723a20687474703a2f2f7777772e7a6f636b2e636f6d2f0d0a0d0a ASCII:E..i....@.......U...@..P..3.......<.+]........A,..7aGET /8-Bit/Enterprise.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..Referer: http://www.zock.com/.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 23 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010268008100004006ce80c0a80002550d93d740040050c313600b2189e30280183d0e896b00000101080a000541d810fc379d474554202f382d4269742f436f6d6d6f646f72652e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f3300952f67defcc6ed1d347b7ceeedfb778e5fce235ac8686115ab56ae308cac316b074dd71178eea481b1c3edf0e23472b86563478ef11d3878c0a0d1fc79f519396ee48081c78c1d1835dc5a59c326cd1d314d985871cb530d8edb59b7de81f1844c1c3578c8a841e3154d1cab7b60bc8631a78e9c346cdef81f51c2f29d393d64c8781de3791c3e68ead0b5d3318699a032b01061e85086931d3366b0a95263c654d325ac2e916327b81e3d7a62f49163c64dc9a056b1fcae038348ff38c1ade0e5832424f88e2e61b29131b3c8882a682292f92d038ad9ea36c4c3d431a248433d4c6544019ea46154193662d81831a5e1c38889991c99223ec68c1146f03ed45fc72e1bbc328c3c3962a47a0c1a5671c78983c6ccdd385e9da0d9ea746e1e34f2b5728581248ec9336cf27b3d8326cd1bbb68dcaae943d62ae13420417aad78312350a1448d228523c3aad500 ASCII:E...h....@.......U...@..P..`.!.....=..k........A...7.GET /8-Bit/Commodore.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/3../g.....4{|...w._.#Z.ha..V.0..1k.M..x........4r.ecG...8x....y..9n.......5.ZY.&..1M.Xq.S...Y.....L.5x..A..M..{`..1...4l...Q...9=d.x..y.>h....1...2..a.P...3f..Rc.T.%...c'..=zb..c.M..V.....H.8.....$$...a..1...*h"..-....6...1.HC=LeD...aT.6b..1........">...F.>._....2.<9b.z..Vq......8^....tn.4..r..$..3l.{=.&...h...C.*.4 Az.x1#P.D.".#.... -uncompressed= 45000268008100004006ce80c0a80002550d93d740040050c313600b2189e30280183d0e896b00000101080a000541d810fc379d474554202f382d4269742f436f6d6d6f646f72652e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a526566657265723a20687474703a2f2f7777772e7a6f636b2e636f6d2f0d0a0d0a ASCII:E..h....@.......U...@..P..`.!.....=..k........A...7.GET /8-Bit/Commodore.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..Referer: http://www.zock.com/.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 24 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010263008200004006ce84c0a80002550d93d740050050c3138e0daf7b2cf180183962cb2f00000101080a000542b410fc3822474554202f382d4269742f454143412e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b330096dfa4bd83668f4fbb78f5cec97b79440b192da24ead7a1586913561eda0c13a02cf9d343076a4f50d9c468eb46cecc809be03070f1834902b873e23c78d1c30f098b103a3465a2b6bd8a4b923a609132b6979aac1219baad53b309e9089a3060f193568b2a28913750f0cd530e6d4919386cd9bfc234a44be33a7870c19aa63288fc3074d9db77630c63023078e0c2c440c2294e164c78c196caad498e1347489a84be4d8e1ad478f9e187de49871035264542cbaebc020823f0e6f2b73f920e1b81da34a966c64bc2c32a20a1a866474cb801216ba8dee2c758c287250cf511951762739c854868d1836464c39a89021612647a6748f31638491b90aebd789cb66ae0c234f8e18811e8346d4d971e2a03123374e562768ac26759b074dfbaa5761208913f20c1bfa59cfa049f3262e9ab46afa7c8dfa37cdc68d59214aa4a873e7cfa04347468d1a00 ASCII:E...c....@.......U...@..P.....{,...9b./........B...8"GET /8-Bit/EACA.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+3......f.O.x...{yD..-.N.z...5a...:...40v....F..l........4.+.>#...0.....FZ+k...#...+iy..!...;0.......5h....u...0........#JD.3.....c(...M..v0.0#...,D."..d...l....4t..K....G...}..q.RdT,... .?.o+s. ....J.ld.,2....dt.......,u.(rP.Q.Qv'9.T...6FL9..!a&G.t.1c........f..#O.....F..q..1#7NV'h.&u..M..Wa ......Y..I.&...j.|..7...Y!J..s...CGF... -uncompressed= 45000263008200004006ce84c0a80002550d93d740050050c3138e0daf7b2cf180183962cb2f00000101080a000542b410fc3822474554202f382d4269742f454143412e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a526566657265723a20687474703a2f2f7777772e7a6f636b2e636f6d2f0d0a0d0a ASCII:E..c....@.......U...@..P.....{,...9b./........B...8"GET /8-Bit/EACA.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..Referer: http://www.zock.com/.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 25 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010262008500004006ce82c0a80002550d93d740070050c314f5defa37d29b80183c168b6100000101080a000542c810fc37e5474554202f382d4269742f4d53582e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b330095dfa0bd83668fcfba77f3cec16b79440b192da04aa56a1586913560eda0b93a02cf9d343076a0edfd9b460eb46cecc801be03070f18348e277f3e23c78d1c30f098b103a3065a2b6bd8a4b923a609132b6879aac1117b6ad53b309e9089a3060f193568b0a28903750f8cd430e6d4919386cd1bfc234a40be33a7870c19a963248fc3074d1db7762ec63023078e0c2c440a1e94e164c78c196caad498d1147409a84be4d8d9ad478f9e187de49871f33124542cb9ebc020723fce6e2b72f920d9a8fd62ca956c64b82c32a20a9a856472cb8002f6b90dee2b758c2862508f511951742731b854868d1836464c318870e1602647a6708f31638411b908e9d781cb46ae0c234f8e18791e830654d971e2a03113370e562768aa226d9b070d7baa5661208903f20c9bf958cfa049f3062e1ab46afa7885ea378d468d581f469c9853674fa0424542851a00 ASCII:E...b....@.......U...@..P.....7....<..a........B...7.GET /8-Bit/MSX.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+3......f...w...kyD..-.J.j...5`...:...40v....F..l........4.'.>#...0......Z+k...#...+hy...{j.;0.......5h....u...0........#J@.3.....c$...M..v..0#...,D....d...l.....t..K....G...}..q.1$T,... r?.n+r. ...b..ld.,2....dr.......+u.(bP.Q.Qt'1.T...6FL1.p.`&G.p.1c........F..#O..y...T.q..1.7.V'h."m...{.Va ......X..I.....j.x..7.F.X.F..SgO.BEB... -uncompressed= 45000262008500004006ce82c0a80002550d93d740070050c314f5defa37d29b80183c168b6100000101080a000542c810fc37e5474554202f382d4269742f4d53582e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a526566657265723a20687474703a2f2f7777772e7a6f636b2e636f6d2f0d0a0d0a ASCII:E..b....@.......U...@..P.....7....<..a........B...7.GET /8-Bit/MSX.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..Referer: http://www.zock.com/.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 26 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010265009400004006ce70c0a80002550d93d740060050c3143614a11fa986801836e1f43c00000101080a000545b010fc38b7474554202f382d4269742f4d617474656c2e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d3300942dbf512b744fcfbb79f7ced17b79440b192da452b58a1586913562eda0c93a02cf9d343076a8edfd9b460eb56cecc801be03070f18348e277f3e23c78d1c30f098b103a3865a2b6bd8a4b923a609132b6a77aac111bbead53b309e9089a3060f193568b4a28923750f8cd430e6d4919386cd1bfc234a44be33a7870c19a963248fc3074d1db87630c63023078e0c2c440a1e94e164c78c196caad498f1347409a94be4d8d9ad478f9e187de498710352a4542cb9ebc020723fce6e2b74f920e1a81da34a966c64bc2c32a20a1a866472cb8022f6b90dee2c758c2862504f521951742731e854868d1836464c31889021612647a6708f31638411ba08e9d791bbd8c89323469ec7a02195769c3868cc7ca5abd5099aab4bdfe641c3de2a561848e2843cc366bed63368d2bc018a46ad9a3e60a5fe4db371a356881229eae4f97368d19152a50600 ASCII:E...e....@..p....U...@..P..6.......6..<........E...8.GET /8-Bit/Mattel.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtm3..-.Q+tO..y...{yD..-.R.....5b...:...40v....F..l........4.'.>#...0......Z+k...#...+jw......;0.......5h...#u...0........#JD.3.....c$...M..v0.0#...,D....d...l....4t..K....G...}..q.R.T,... r?.n+t. ....J.ld.,2....dr.."....,u.(bPOR.Qt'1.T...6FL1..!a&G.p.1c...........#F...!.v.8h.|......K..A..*V.H..<.f..3h....F..>`..M.q.V..)...sh..R... -uncompressed= 45000265009400004006ce70c0a80002550d93d740060050c3143614a11fa986801836e1f43c00000101080a000545b010fc38b7474554202f382d4269742f4d617474656c2e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a526566657265723a20687474703a2f2f7777772e7a6f636b2e636f6d2f0d0a0d0a ASCII:E..e....@..p....U...@..P..6.......6..<........E...8.GET /8-Bit/Mattel.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..Referer: http://www.zock.com/.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 27 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010263009900004006ce6dc0a80002550d93d740040050c313623f2189e66b801839a5739a00000101080a0005464c10fc38f3474554202f382d4269742f4f7269632e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b330095dfa4bd83668f4fc578f5eab13ca2858c1651a756bd0ac3c89ab076d0601d81e74e1a183bd2fa064e23475a3676e404df8183070c1ac895439f91e3460e1878ccd8815123ad95356cd2dc11d3848995b43cd5e0904dd5ea1d184fc8c45183878c1a3459d1c489ba0706631873eac849c3e64dfe112520df99d343860cc63194c7e18326e8768c31ccc88123030b1183086538d93163069b2a356638155d22ea12397678ebd1a327461f3966dc7c0c19158bee3a3088e08fc3db8a5c3e4838dac19872251b192e8b8ca882862119dd32a084856ea3fb4a1d238a1cd483544694dd490e36956123868d11530e2a642898c99129dd63cc186144aec2fa75e0b2912bc3c8932346a0c7a01135769c3868ccc48d93d5091aab4adde641d3beea551848e2803cc3867ed63368d2bc818b26ad9a3e5fa3f64db3716356881229e6d4d91328519151a30600 ASCII:E...c....@..m....U...@..P..b?!..k..9.s.........FL..8.GET /8-Bit/Oric.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+3......f.O.x...<....Q.V......v.`...N..;...N#GZ6v..........C...F..x...Q#..5l........<...M....O..Q....4Y......c.s..I..M..% ...C...1....&.v.1...#.....e8.1c..*5f8.]"..9vx...'F.9f.|.....:0......\>H8...r%........!..2...n..J.#....TF..I.6.a#...S.*d(...).c..aD...u...+...#F....5v.8h........J..A...U.H..<..~.3h....&..>_..M.qcV..)....(Q.Q... -uncompressed= 45000263009900004006ce6dc0a80002550d93d740040050c313623f2189e66b801839a5739a00000101080a0005464c10fc38f3474554202f382d4269742f4f7269632e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a526566657265723a20687474703a2f2f7777772e7a6f636b2e636f6d2f0d0a0d0a ASCII:E..c....@..m....U...@..P..b?!..k..9.s.........FL..8.GET /8-Bit/Oric.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..Referer: http://www.zock.com/.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 28 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 4500010269009e00004006ce62c0a80002550d93d740060050c3143845a11fab60801840003c1c00000101080a000547d810fc38b7474554202f382d4269742f526164696f536861636b2e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f330096316be6fcc6ed1d347b7a46f60b584fe7112d64b4b08a552b5718468ad6b183a6eb083c77d2c0d8e17678711a39dcb2b123c7f80e1c3c60d068febcfa8c1c3772c0c063c60e8c1a6e89b24973474c132656dcee5483e376d6ad77603c2113470d1e326ad0784513c7ea1e189361cca923270d9b37fd4794b87c674e0f193226c7781e870f9a3a74ed748c61460e1c195888307428c3c98e1933d854a93163eae9125697c8b1135c8f1e3d31fac831e3a6e449ab587ed78141847f9ce056f0f24112127cc79731d9c8a0596444153411c9fc9601c56c751be263ea1851a4a19ea732a2004fd2b0aa0c1b316c8c98d2f061c4c54c8e4c111f63c60823781fe6af6357685e234f8e18a91e838655dd71e2a03173378e572768b6469d9b074d7cad5c61208963f20c1bfc5ecfa049f3c62e1ab76afa90b55a380d48905e2b5ecc1874e8d1a44b515ab51a00 ASCII:E...i....@..b....U...@..P..8E...`..@.<.........G...8.GET /8-Bit/RadioShack.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/3..1k.....4{zF..XO..-d...U+W.F.......#...0......Z+A........<...}5...O..Q....4\......c.s..I#4.......!C......AS....1...#.....e8.1c..*5fD.]...9vz...'F.9f.|.I...:0......]>H6r..r%..........2.e@......:F.9.G..(...|*.F..#..T(.0.#S...1..]....eCW..'G.D.A...8q.......4Y.....=V.0...y..}.g..y#..Z5}.R..F.F..#N...'P.".R.. -uncompressed= 45000266009f00004006ce64c0a80002550d93d740050050c313903caf7b2f9580183d5ce4ef00000101080a0005481810fc3934474554202f382d4269742f5068696c6970732e47494620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d6c2b786d6c2c20746578742f766e642e7761702e776d6c2c202a2f2a0d0a4163636570742d436861727365743a207574662d382c207574662d31362c2069736f2d383835392d312c2069736f2d31303634362d7563732d322c2053686966745f4a49532c20426967350d0a4163636570742d4c616e67756167653a20656e0d0a782d7761702d70726f66696c653a2022687474703a2f2f7761702e736f6e796572696373736f6e2e636f6d2f554170726f662f4b38303069523230312e786d6c220d0a486f73743a207777772e7a6f636b2e636f6d0d0a557365722d4167656e743a20536f6e794572696373736f6e4b383030692f5232422052656c656173652f4d61722d31332d323030372042726f777365722f4e657446726f6e742f332e332050726f66696c652f4d4944502d322e3020436f6e66696775726174696f6e2f434c44432d312e310d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a206465666c6174652c20677a69700d0a526566657265723a20687474703a2f2f7777772e7a6f636b2e636f6d2f0d0a0d0a ASCII:E..f....@..d....U...@..P...<.{/...=\..........H...94GET /8-Bit/Philips.GIF HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*..Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5..Accept-Language: en..x-wap-profile: "http://wap.sonyericsson.com/UAprof/K800iR201.xml"..Host: www.zock.com..User-Agent: SonyEricssonK800i/R2B Release/Mar-13-2007 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1..Connection: Keep-Alive..Accept-Encoding: deflate, gzip..Referer: http://www.zock.com/.... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 30 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 450001049b00ae00004006cc20c0a80002550d93d740050050c31396ceaf7b396e801840009ad400000101080a0005611010fc3d6b474554202f382d4269742f6d72776f6e672e67696620485454502f312e310d0a4163636570743a206d756c7469706172742f6d697865642c206170706c69636174696f6e2f766e642e7761702e6d756c7469706172742e6d697865642c206170706c69636174696f6e2f766e642e7761702e7868746d6c2b786d6c2c206170706c69636174696f6e2f7868746d33009733bf617b07cd9e9f8ef7f6d5a379440b192da85ac5aa1586913564eda0d93a02cf9d343076b00d3e9c460eb66cecc821be03070f183496379f3e23c78d1c30f098b103a3065b2b6b92de11d3848915b63dd5e0a87d35eb1d184fc814c543460d1aae68e250dd0303328c3975e4a461f346ff881294efcce9214306e418cde3f0415347ae1d8c31ccc88123030b1183086538d93163069b2a3566442d5d82ea1239767eebd1a327461f3966dc801449154bef3a3088e48ff3db0a513e48387ac7a892251b192f8b8ca882862199de32a0909d6e033c4b1d238a1cd4a3544614df490e3e956123868d11530e2a644898c99129e063cc186184a8423578ead06563d7c8932346a6c7a04175769c3868ccd48dc3d5099aac4ce3e641f31eab561848e2843cc3a628d73368d2bca18b86ad9a3e62a9fe4db3712357881229eadce933e8d09154a92a417265848c1d307afec489074e198678e6108d31a7e8882557ae4c9111357903abdf7f7b052b96ec4f3868d51e7e1b77ae74198ef7f63d1a76ce52bf50cf4c9d7355b7ddb290634cae7cb9b4dec05f135b76c178c41d347b7e16eeabc732db16325a74cf7a07869135647bff0e3e7c075bdad3732c6f4e7c070e1ed37dcb993e23c78d1c30f07807cfd6ca1a3669ee8869c2c40adb9e6a70a8d60ae30999a278c8e4e78a260ed53d3020c33088900d43ae25204aa46818239f8d6cbc631c3a120b11ff6964a864c9e6e58ca8a54b505d220727579d3b7d06bd48158b52a6f99f72b542940f923a13ed600c39838d8c974546fc6548a63761b2d36d8067a96344913a72f428951105cd9d248a9fcab011c3c688298ad30c444398c99129e063cc18313bce683578eae8b66be4c91123d363246f003b0e1a33d2b93a41939569dc3c68d6df8181248e193967d814e57a064d9a3774d1b055d387cd1caa7fd36cdcc835618f853a63d07473510655aa0100 ASCII:E........@.. ....U...@..P.....{9n..@...........a...=kGET /8-Bit/mrwong.gif HTTP/1.1..Accept: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtm3..3.a{.........yD..-.Z.....5d...:...40v..>.F..l..!.....4.7.>#...0......[+k........=...}5...O...CF...h.P...2.9u..a.F.......!C......ASG...1...#.....e8.1c..*5fD-]...9v~...'F.9f...I.K.:0......Q>H8z...%../.....!..2...n..a#...S.*dH...).c..a..B5x..ec...#F...Auv.8h........L..A...V.H..<..(.3h.......>b..M.q#W..)...3...T.*Are...0z....N..x...1...%W.L..5y....{.+..O8h..~.w.t....=.v.R.P.L.sU....cL.|...._.[v.x..4{~....2..2Zt.z...5d{..>|.[..s,oN|....}..>#...0.x.....6i..i.....jp.......x....&..=0 .0...C.% J.h.#..l.c.:....id.d......KP]".'W.;}..H..R...r.B...:..`.9....EF.eH.7a..m.g.cD.:r.(.....$........)...DC...).c..1;.h5x...k...#.c$o.;..3..:A..i.Directory listing f.or /.Directory listing for /..

Directory listing for /

.
..
... - -Testing decompression with sniffed compressed TCP/IP packets: -Packet No.: 32 -v42bis_decompress_flush() rc=0 -v42bis_decompress() rc=0 -v42bis_decompress_flush() rc=0 -compressed= 45000101a0e9a54000400683540a0901abc0a800021f904004437442f17a4ab3b1501900ed04900000485454502f312e3020323030204f4b0d0a5365727665723a2053696d706c65485454502f302e3620507974686f6e2f322e372e360d0a446174653a205765642c203301312041756720323031362030393a32373a353520474d540d0a436f6e74656e742d747970653a20746578742f68746d6c3b20636861727365743d5554462d380d0a436f6e74656e742d4c656e6774683a203232320d0a0d0a66003f481c9162e40a97294800002068746d6c20506600588a3c6162644409183200002f5733432f2f4454442048544d4c20332e322046696e616c2f2f454e223e3c68746d6c3e0a3c7469746c653e4469726563746f7279206c697374696e672066016f72202f3c2f7469746c990068beff2823e70c9f816b6a9847af9ebd7bf8f2e9dbc7af5ff142f06bea0cc4e31d7cfced646aa74f03a444fa3373a4c64113634e7ded28554e7d1953cd7e320365744cb811bc8c82078376ff1e00 ASCII:E......@.@..T..........@.CtB.zJ..P.......HTTP/1.0 200 OK..Server: SimpleHTTP/0.6 Python/2.7.6..Date: Wed, 3.1 Aug 2016 09:27:55 GMT..Content-type: text/html; charset=UTF-8..Content-Length: 222....f.?H..b...)H.. html Pf.X..Directory listing f.or /</titl..h..(#....kj.G...{......_.B.k.....|..dj.O..D.3s..A.cN}.(UN}.S.~2.etL.......v... -uncompressed= 450001a0e9a54000400683540a0901abc0a800021f904004437442f17a4ab3b1501900ed04900000485454502f312e3020323030204f4b0d0a5365727665723a2053696d706c65485454502f302e3620507974686f6e2f322e372e360d0a446174653a205765642c2033312041756720323031362030393a32373a353520474d540d0a436f6e74656e742d747970653a20746578742f68746d6c3b20636861727365743d5554462d380d0a436f6e74656e742d4c656e6774683a203232320d0a0d0a3c21444f43545950452068746d6c205055424c494320222d2f2f5733432f2f4454442048544d4c20332e322046696e616c2f2f454e223e3c68746d6c3e0a3c7469746c653e4469726563746f7279206c697374696e6720666f72202f3c2f7469746c653e0a3c626f64793e0a3c68323e4469726563746f7279206c697374696e6720666f72202f3c2f68323e0a3c68723e0a3c756c3e0a3c6c693e3c6120687265663d2272656470686f6e652e706e67223e72656470686f6e652e706e673c2f613e0a3c2f756c3e0a3c68723e0a3c2f626f64793e0a3c2f68746d6c3e0a ASCII:E.....@.@..T..........@.CtB.zJ..P.......HTTP/1.0 200 OK..Server: SimpleHTTP/0.6 Python/2.7.6..Date: Wed, 31 Aug 2016 09:27:55 GMT..Content-type: text/html; charset=UTF-8..Content-Length: 222....<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html>.<title>Directory listing for /..

Directory listing for /

.
..
... - -Done diff --git a/tests/xid/Makefile.am b/tests/xid/Makefile.am deleted file mode 100644 index 6f058f5a..00000000 --- a/tests/xid/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -AM_CPPFLAGS = \ - $(all_includes) \ - -I$(top_srcdir)/include \ - $(NULL) - -AM_CFLAGS = \ - -Wall \ - -ggdb3 \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBCARES_CFLAGS) \ - $(NULL) - -EXTRA_DIST = \ - xid_test.ok \ - $(NULL) - -noinst_PROGRAMS = \ - xid_test \ - $(NULL) - -xid_test_SOURCES = \ - xid_test.c \ - $(NULL) - -xid_test_LDADD = \ - $(top_builddir)/src/sgsn/gprs_llc_xid.o \ - $(LIBOSMOABIS_LIBS) \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBOSMOGB_LIBS) \ - $(LIBCARES_LIBS) \ - $(LIBGTP_LIBS) \ - -lrt \ - -lm \ - $(NULL) - diff --git a/tests/xid/xid_test.c b/tests/xid/xid_test.c deleted file mode 100644 index 89d82e99..00000000 --- a/tests/xid/xid_test.c +++ /dev/null @@ -1,167 +0,0 @@ -/* Test LLC-XID Encoding/Decoding */ - -/* (C) 2016 by sysmocom s.f.m.c. GmbH - * All Rights Reserved - * - * Author: Philipp Maier - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -#include -#include - -#include -#include - -#include - -#include -#include - -/* Test XID encoding */ -static void test_xid_encode(const void *ctx) -{ - struct gprs_llc_xid_field xid_field_1; - struct gprs_llc_xid_field xid_field_2; - struct gprs_llc_xid_field xid_field_3; - struct gprs_llc_xid_field xid_field_4; - LLIST_HEAD(xid_fields); - uint8_t xid[255]; - uint8_t xid_expected[] = - { 0x10, 0x8c, 0x14, 0x43, 0x43, 0x43, 0x43, 0x43, 0x0b, 0x42, 0x42, - 0x42, 0x05, 0x41 }; - int rc; - - printf("Testing LLC XID-Encoder\n"); - - /* Setup some simple XID data */ - xid_field_1.type = 1; - xid_field_2.type = 2; - xid_field_3.type = 3; - xid_field_4.type = 4; - - xid_field_1.data = (uint8_t *) "A"; - xid_field_2.data = (uint8_t *) "BBB"; - xid_field_3.data = (uint8_t *) "CCCCC"; - xid_field_4.data = NULL; - - xid_field_1.data_len = 1; - xid_field_2.data_len = 3; - xid_field_3.data_len = 5; - xid_field_4.data_len = 0; - - llist_add(&xid_field_4.list, &xid_fields); - llist_add(&xid_field_3.list, &xid_fields); - llist_add(&xid_field_2.list, &xid_fields); - llist_add(&xid_field_1.list, &xid_fields); - - printf("Data to encode:\n"); - gprs_llc_dump_xid_fields(&xid_fields, DSNDCP); - - /* Encode data */ - rc = gprs_llc_compile_xid(xid, sizeof(xid), &xid_fields); - OSMO_ASSERT(rc == 14); - printf("Encoded: %s (%i bytes)\n", osmo_hexdump_nospc(xid, rc), rc); - printf("Expected: %s (%i bytes)\n", - osmo_hexdump_nospc(xid_expected, sizeof(xid_expected)), - (int)sizeof(xid_expected)); - - OSMO_ASSERT(memcmp(xid_expected, xid, sizeof(xid_expected)) == 0); - - printf("\n"); -} - -/* Test XID decoding */ -static void test_xid_decode(const void *ctx) -{ - struct llist_head *xid_fields; - int rc; - - printf("Testing LLC XID-Decoder/Encoder\n"); - - /* Example of a real world LLC-XID message */ - uint8_t xid[] = - { 0x01, 0x00, 0x16, 0x05, 0xf0, 0x1a, 0x05, 0xf0, 0xac, 0xd8, 0x00, - 0x01, 0x00, 0x02, 0x31, 0x82, 0x02, 0x27, 0x89, 0xff, 0xe0, 0x00, 0x0f, - 0x00, 0xa8, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x02, 0x01, 0x02, - 0x00, 0x03, 0x01, 0x03, 0x00, 0x04, 0x01, 0x04, 0x00, 0x05, 0x01, 0x05, - 0x00, 0x06, 0x00, 0x07, 0x01, 0x07, 0x00, 0x08, 0x01, 0x08, 0x80, 0x00, - 0x04, 0x12, 0x00, 0x40, 0x07 }; - - uint8_t xid_r[512]; - - /* Decode and display XID fields */ - xid_fields = gprs_llc_parse_xid(ctx, xid, sizeof(xid)); - OSMO_ASSERT(xid_fields); - - printf("Decoded:\n"); - gprs_llc_dump_xid_fields(xid_fields, DSNDCP); - - - /* Encode xid-fields again */ - rc = gprs_llc_compile_xid(xid_r, sizeof(xid_r), xid_fields); - printf("Result length=%i\n",rc); - printf("Encoded: %s\n", osmo_hexdump_nospc(xid, sizeof(xid))); - printf("Rencoded: %s\n", osmo_hexdump_nospc(xid_r, rc)); - - OSMO_ASSERT(rc == 64); - OSMO_ASSERT(memcmp(xid, xid_r, sizeof(xid)) == 0); - - /* Free xid fields */ - talloc_free(xid_fields); - - printf("\n"); -} - -static struct log_info_cat gprs_categories[] = { - [DSNDCP] = { - .name = "DSNDCP", - .description = - "GPRS Sub-Network Dependent Control Protocol (SNDCP)", - .enabled = 1,.loglevel = LOGL_DEBUG, - } -}; - -static struct log_info info = { - .cat = gprs_categories, - .num_cat = ARRAY_SIZE(gprs_categories), -}; - -int main(int argc, char **argv) -{ - void *xid_ctx; - void *log_ctx; - - xid_ctx = talloc_named_const(NULL, 0, "xid_ctx"); - log_ctx = talloc_named_const(xid_ctx, 0, "log"); - osmo_init_logging2(log_ctx, &info); - - test_xid_decode(xid_ctx); - test_xid_encode(xid_ctx); - printf("Done\n"); - - talloc_report_full(xid_ctx, stderr); - talloc_free(log_ctx); - OSMO_ASSERT(talloc_total_blocks(xid_ctx) == 1); - talloc_free(xid_ctx); - return 0; -} - -/* stubs */ -struct osmo_prim_hdr; -int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx) -{ - abort(); -} diff --git a/tests/xid/xid_test.ok b/tests/xid/xid_test.ok deleted file mode 100644 index 4cf825ca..00000000 --- a/tests/xid/xid_test.ok +++ /dev/null @@ -1,12 +0,0 @@ -Testing LLC XID-Decoder/Encoder -Decoded: -Result length=64 -Encoded: 01001605f01a05f0acd8000100023182022789ffe0000f00a8000000010101000201020003010300040104000501050006000701070008010880000412004007 -Rencoded: 01001605f01a05f0acd8000100023182022789ffe0000f00a8000000010101000201020003010300040104000501050006000701070008010880000412004007 - -Testing LLC XID-Encoder -Data to encode: -Encoded: 108c1443434343430b4242420541 (14 bytes) -Expected: 108c1443434343430b4242420541 (14 bytes) - -Done