Commit 7b6bb640 authored by Lionel Gauthier's avatar Lionel Gauthier

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5935 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent e837fc56
......@@ -2320,7 +2320,9 @@ static int _emm_attach_accept(emm_data_context_t *emm_ctx, attach_data_t *data)
emm_sap.u.emm_as.u.establish.new_guti = emm_ctx->guti;
} else {
emm_sap.u.emm_as.u.establish.UEid.guti = emm_ctx->guti;
emm_sap.u.emm_as.u.establish.new_guti = NULL;
#warning "TEST LG FORCE GUTI IE IN ATTACH ACCEPT"
emm_sap.u.emm_as.u.establish.new_guti = emm_ctx->guti;
//emm_sap.u.emm_as.u.establish.new_guti = NULL;
}
emm_sap.u.emm_as.u.establish.n_tacs = emm_ctx->n_tacs;
emm_sap.u.emm_as.u.establish.tac = emm_ctx->tac;
......
......@@ -269,6 +269,10 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint
encoded += encode_result;
}
#warning "LG TEST override t3402value"
attach_accept->presencemask |= ATTACH_ACCEPT_T3402_VALUE_PRESENT;
attach_accept->t3402value.unit = GPRS_TIMER_UNIT_60S;
attach_accept->t3402value.timervalue = 12;
if ((attach_accept->presencemask & ATTACH_ACCEPT_T3402_VALUE_PRESENT)
== ATTACH_ACCEPT_T3402_VALUE_PRESENT)
{
......
......@@ -61,7 +61,7 @@
LLC_SERVICE_ACCESS_POINT_IDENTIFIER_MAXIMUM_LENGTH + \
RADIO_PRIORITY_MAXIMUM_LENGTH + \
PACKET_FLOW_IDENTIFIER_MAXIMUM_LENGTH + \
PROTOCOL_CONFIGURATION_OPTIONS_MAXIMUM_LENGTH )
PROTOCOL_CONFIGURATION_OPTIONS_MAXIMUM_LENGTH)
/* If an optional value is present and should be encoded, the corresponding
* Bit mask should be set to 1.
......
......@@ -610,6 +610,18 @@ int esm_send_activate_default_eps_bearer_context_request(int pti,
msg->esmcause = esm_cause;
}
#warning "TEST LG FORCE APN-AMBR"
LOG_TRACE(INFO, "ESM-SAP - FORCE APN-AMBR");
msg->presencemask |=
ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_APNAMBR_PRESENT;
msg->apnambr.apnambrfordownlink = 0xfe; // (8640kbps)
msg->apnambr.apnambrforuplink = 0xfe; // (8640kbps)
msg->apnambr.apnambrfordownlink_extended = 0xde; // (200Mbps)
msg->apnambr.apnambrforuplink_extended = 0x9e; // (100Mbps)
msg->apnambr.apnambrfordownlink_extended2 = 0;
msg->apnambr.apnambrforuplink_extended2 = 0;
msg->apnambr.extensions = 0 | APN_AGGREGATE_MAXIMUM_BIT_RATE_MAXIMUM_EXTENSION_PRESENT;
LOG_TRACE(INFO, "ESM-SAP - Send Activate Default EPS Bearer Context "
"Request message (pti=%d, ebi=%d)",
msg->proceduretransactionidentity, msg->epsbeareridentity);
......
......@@ -51,6 +51,18 @@ int decode_apn_aggregate_maximum_bit_rate(ApnAggregateMaximumBitRate *apnaggrega
decoded++;
apnaggregatemaximumbitrate->apnambrforuplink = *(buffer + decoded);
decoded++;
if (ielen >= 4) {
apnaggregatemaximumbitrate->apnambrfordownlink_extended = *(buffer + decoded);
decoded++;
apnaggregatemaximumbitrate->apnambrforuplink_extended = *(buffer + decoded);
decoded++;
if (ielen >= 6) {
apnaggregatemaximumbitrate->apnambrfordownlink_extended2 = *(buffer + decoded);
decoded++;
apnaggregatemaximumbitrate->apnambrforuplink_extended2 = *(buffer + decoded);
decoded++;
}
}
#if defined (NAS_DEBUG)
dump_apn_aggregate_maximum_bit_rate_xml(apnaggregatemaximumbitrate, iei);
#endif
......@@ -76,6 +88,18 @@ int encode_apn_aggregate_maximum_bit_rate(ApnAggregateMaximumBitRate *apnaggrega
encoded++;
*(buffer + encoded) = apnaggregatemaximumbitrate->apnambrforuplink;
encoded++;
if (apnaggregatemaximumbitrate->extensions & APN_AGGREGATE_MAXIMUM_BIT_RATE_MAXIMUM_EXTENSION_PRESENT) {
*(buffer + encoded) = apnaggregatemaximumbitrate->apnambrfordownlink_extended;
encoded++;
*(buffer + encoded) = apnaggregatemaximumbitrate->apnambrforuplink_extended;
encoded++;
if (apnaggregatemaximumbitrate->extensions & APN_AGGREGATE_MAXIMUM_BIT_RATE_MAXIMUM_EXTENSION2_PRESENT) {
*(buffer + encoded) = apnaggregatemaximumbitrate->apnambrfordownlink_extended2;
encoded++;
*(buffer + encoded) = apnaggregatemaximumbitrate->apnambrforuplink_extended2;
encoded++;
}
}
*lenPtr = encoded - 1 - ((iei > 0) ? 1 : 0);
return encoded;
}
......@@ -88,6 +112,14 @@ void dump_apn_aggregate_maximum_bit_rate_xml(ApnAggregateMaximumBitRate *apnaggr
printf(" <IEI>0x%X</IEI>\n", iei);
printf(" <APN AMBR for downlink>%u</APN AMBR for downlink>\n", apnaggregatemaximumbitrate->apnambrfordownlink);
printf(" <APN AMBR for uplink>%u</APN AMBR for uplink>\n", apnaggregatemaximumbitrate->apnambrforuplink);
if (apnaggregatemaximumbitrate->extensions & APN_AGGREGATE_MAXIMUM_BIT_RATE_MAXIMUM_EXTENSION_PRESENT) {
printf(" <APN AMBR extended for downlink>%u</APN AMBR for downlink>\n", apnaggregatemaximumbitrate->apnambrfordownlink_extended);
printf(" <APN AMBR extended for uplink>%u</APN AMBR for uplink>\n", apnaggregatemaximumbitrate->apnambrforuplink_extended);
if (apnaggregatemaximumbitrate->extensions & APN_AGGREGATE_MAXIMUM_BIT_RATE_MAXIMUM_EXTENSION2_PRESENT) {
printf(" <APN AMBR extended2 for downlink>%u</APN AMBR for downlink>\n", apnaggregatemaximumbitrate->apnambrfordownlink_extended);
printf(" <APN AMBR extended2 for uplink>%u</APN AMBR for uplink>\n", apnaggregatemaximumbitrate->apnambrforuplink_extended);
}
}
printf("</Apn Aggregate Maximum Bit Rate>\n");
}
......@@ -38,9 +38,17 @@
#define APN_AGGREGATE_MAXIMUM_BIT_RATE_MINIMUM_LENGTH 4
#define APN_AGGREGATE_MAXIMUM_BIT_RATE_MAXIMUM_LENGTH 8
#define APN_AGGREGATE_MAXIMUM_BIT_RATE_MAXIMUM_EXTENSION_PRESENT (1<<0)
#define APN_AGGREGATE_MAXIMUM_BIT_RATE_MAXIMUM_EXTENSION2_PRESENT (1<<1)
typedef struct ApnAggregateMaximumBitRate_tag {
uint8_t apnambrfordownlink;
uint8_t apnambrforuplink;
uint8_t apnambrfordownlink_extended;
uint8_t apnambrforuplink_extended;
uint8_t apnambrfordownlink_extended2;
uint8_t apnambrforuplink_extended2;
uint8_t extensions;
} ApnAggregateMaximumBitRate;
int encode_apn_aggregate_maximum_bit_rate(ApnAggregateMaximumBitRate *apnaggregatemaximumbitrate, uint8_t iei, uint8_t *buffer, uint32_t len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment