aboutsummaryrefslogtreecommitdiffstats
path: root/sgsnemu
diff options
context:
space:
mode:
authorjjako <jjako>2004-05-27 18:51:55 +0000
committerjjako <jjako>2004-05-27 18:51:55 +0000
commitb62c3dd3c40c32c39466d83e589a846707d9ea99 (patch)
tree16acd0ef5be8e46c90990cb7bd98a97cea017db1 /sgsnemu
parent3d524e3806dc2d65e5523e2197fa329b2a6ba689 (diff)
Fix on PPP PCO length and charging characteristics required flag.
Diffstat (limited to 'sgsnemu')
-rw-r--r--sgsnemu/sgsnemu.c9
1 files changed, 8 insertions, 1 deletions
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]);