From patchwork Thu Sep 4 15:20:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Willmann X-Patchwork-Id: 385870 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ganesha.gnumonks.org (ganesha.gnumonks.org [IPv6:2001:780:45:1d:225:90ff:fe52:c662]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A885114012E for ; Fri, 5 Sep 2014 01:25:45 +1000 (EST) Received: from localhost ([127.0.0.1] helo=ganesha.gnumonks.org) by ganesha.gnumonks.org with esmtp (Exim 4.72) (envelope-from ) id 1XPYui-0006Or-Pz; Thu, 04 Sep 2014 17:25:32 +0200 Received: from isonoe.totalueberwachung.de ([2a01:198:210:100::1]) by ganesha.gnumonks.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1XPYsi-00066u-5b for openbsc@lists.osmocom.org; Thu, 04 Sep 2014 17:23:34 +0200 Received: from adrastea.totalueberwachung.de (unknown [91.65.194.134]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by isonoe.totalueberwachung.de (Postfix) with ESMTPSA id 5748A6003A; Thu, 4 Sep 2014 17:23:27 +0200 (CEST) Received: by adrastea.totalueberwachung.de (Postfix, from userid 1000) id A238C42424; Thu, 4 Sep 2014 17:23:26 +0200 (CEST) From: Daniel Willmann To: OpenBSC Mailing List Subject: [openbsc 1/2] gprs_sgsn.h: Add two macros to log details of MM/PDP contexts Date: Thu, 4 Sep 2014 17:20:52 +0200 Message-Id: <5af7979f7bc45ce7aa2249cf812998aaa564b6d4.1409844053.git.daniel@totalueberwachung.de> X-Mailer: git-send-email 1.8.4.2 X-Spam-Score: -0.0 (/) Cc: Daniel Willmann X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Development of the OpenBSC GSM base station controller List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openbsc-bounces@lists.osmocom.org Errors-To: openbsc-bounces@lists.osmocom.org --- openbsc/include/openbsc/gprs_sgsn.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 6e7c677..6a02637 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -113,6 +113,9 @@ struct sgsn_mm_ctx { uint8_t t3370_id_type; }; +#define LOGMMCTXP(level, mm, fmt, args...) \ + LOGP(DMM, level, "MM(imsi=%s p-tmsi=0x%08x tlli=0x%08x) " fmt, (mm)->imsi, (mm)->p_tmsi, (mm)->tlli, ## args) + /* look-up a SGSN MM context based on TLLI + RAI */ struct sgsn_mm_ctx *sgsn_mm_ctx_by_tlli(uint32_t tlli, const struct gprs_ra_id *raid); @@ -176,6 +179,8 @@ struct sgsn_pdp_ctx { unsigned int num_T_exp; /* number of consecutive T expirations */ }; +#define LOGPDPCTXP(level, pdp, fmt, args...) \ + LOGP(DGPRS, level, "PDP(imsi=%s ti=%u) " fmt, (pdp)->mm->imsi, (pdp)->ti, ## args) /* look up PDP context by MM context and NSAPI */ struct sgsn_pdp_ctx *sgsn_pdp_ctx_by_nsapi(const struct sgsn_mm_ctx *mm,