From b62c3dd3c40c32c39466d83e589a846707d9ea99 Mon Sep 17 00:00:00 2001 From: jjako Date: Thu, 27 May 2004 18:51:55 +0000 Subject: Fix on PPP PCO length and charging characteristics required flag. --- sgsnemu/sgsnemu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sgsnemu') diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index 9bc576e..388f736 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -473,7 +473,7 @@ int process_options(int argc, char **argv) { options.pco.v[0] = 0x80; /* PPP */ options.pco.v[1] = 0xc0; /* PAP */ options.pco.v[2] = 0x23; - options.pco.v[3] = 0x12; /* Length of protocol contents */ + options.pco.v[3] = strlen(args_info.uid_arg) + strlen(args_info.pwd_arg) + 6; options.pco.v[4] = 0x01; /* Authenticate request */ options.pco.v[5] = 0x01; options.pco.v[6] = 0x00; /* MSB of length */ @@ -1168,6 +1168,13 @@ int main(int argc, char **argv) pdp->hisaddr0 = options.remote; pdp->hisaddr1 = options.remote; + /* TODO: This could be an option */ + pdp->cch_pdp = 2048; /* Normal charging 3GPP 32.015 */ + /* 2048 = Normal + 1024 = Prepaid + 0512 = Flat rate + 0256 = Hot billing */ + /* Create context */ /* We send this of once. Retransmissions are handled by gtplib */ gtp_create_context_req(gsn, pdp, &iparr[n]); -- cgit v1.2.3