diff options
Diffstat (limited to 'include/osmocom/sgsn/gprs_sgsn.h')
-rw-r--r-- | include/osmocom/sgsn/gprs_sgsn.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/gprs_sgsn.h index 48c063d07..17cafa3d1 100644 --- a/include/osmocom/sgsn/gprs_sgsn.h +++ b/include/osmocom/sgsn/gprs_sgsn.h @@ -3,6 +3,7 @@ #include <stdint.h> #include <netinet/in.h> +#include <inttypes.h> #include <osmocom/core/fsm.h> #include <osmocom/core/timer.h> @@ -405,6 +406,11 @@ void sgsn_ggsn_ctx_add_pdp(struct sgsn_ggsn_ctx *ggc, struct sgsn_pdp_ctx *pdp); void sgsn_ggsn_ctx_remove_pdp(struct sgsn_ggsn_ctx *ggc, struct sgsn_pdp_ctx *pdp); void sgsn_ggsn_ctx_check_echo_timer(struct sgsn_ggsn_ctx *ggc); +#define LOGGGSN(ggc, level, fmt, args...) { \ + char _buf[INET_ADDRSTRLEN]; \ + LOGP(DGTP, level, "GGSN(%" PRIu32 ":%s): " fmt, (ggc)->id, inet_ntop(AF_INET, &(ggc)->remote_addr, _buf, sizeof(_buf)), ## args); \ + } while (0) + struct apn_ctx { struct llist_head list; struct sgsn_ggsn_ctx *ggsn; |