Fix trailing whitespace (#1365)

* [SMF] Fix trailing whitespace

* [CORE] Fix trailing whitespace

* [GTP] Fix trailing whitespace
This commit is contained in:
Pau Espin 2022-02-14 12:11:04 +01:00 committed by GitHub
parent 906e7c5046
commit 757285bf25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 53 deletions

View File

@ -121,7 +121,7 @@ uint16_t ogs_plmn_id_mcc(ogs_plmn_id_t *plmn_id);
uint16_t ogs_plmn_id_mnc(ogs_plmn_id_t *plmn_id);
uint16_t ogs_plmn_id_mnc_len(ogs_plmn_id_t *plmn_id);
void *ogs_plmn_id_build(ogs_plmn_id_t *plmn_id,
void *ogs_plmn_id_build(ogs_plmn_id_t *plmn_id,
uint16_t mcc, uint16_t mnc, uint16_t mnc_len);
char *ogs_serving_network_name_from_plmn_id(ogs_plmn_id_t *plmn_id);
@ -265,7 +265,7 @@ ED2(uint8_t spare:5;,
uint8_t session_type:3;)
union {
/* PDU_SESSION_TYPE_IPV4 */
uint32_t addr;
uint32_t addr;
/* PDU_SESSION_TYPE_IPV6 */
struct {
@ -283,7 +283,7 @@ ED2(uint8_t spare:5;,
/* IPv6 Prefix and Interface Identifier */
uint8_t addr6[OGS_IPV6_LEN];
};
uint32_t addr;
uint32_t addr;
} __attribute__ ((packed)) both;
};
} __attribute__ ((packed)) ogs_paa_t;
@ -305,8 +305,8 @@ typedef struct ogs_qos_s {
struct {
/* Values 1 to 8 should only be assigned for services that are
* authorized to receive prioritized treatment within an operator domain.
* Values 9 to 15 may be assigned to resources that are authorized
* authorized to receive prioritized treatment within an operator domain.
* Values 9 to 15 may be assigned to resources that are authorized
* by the home network and thus applicable when a UE is roaming. */
uint8_t priority_level;
/*
@ -370,7 +370,7 @@ typedef struct ogs_pcc_rule_s {
int flow_status;
uint32_t precedence;
ogs_qos_t qos;
} ogs_pcc_rule_t;
@ -453,8 +453,8 @@ int ogs_fqdn_parse(char *dst, char *src, int len);
/**************************************************
* Protocol Configuration Options Structure
* 8.13 Protocol Configuration Options (PCO)
* 10.5.6.3 Protocol configuration options in 3GPP TS 24.008
* 8.13 Protocol Configuration Options (PCO)
* 10.5.6.3 Protocol configuration options in 3GPP TS 24.008
* RFC 3232 [103]
* RFC 1661 [102] */
#define OGS_PCO_PPP_FOR_USE_WITH_IP_PDP_TYPE_OR_IP_PDN_TYPE 0

View File

@ -246,8 +246,8 @@ ED8(uint8_t spare1:1;,
uint8_t emergency_pdu_session_indication:1;)
} __attribute__ ((packed)) ogs_gtp_indication_t;
/* 8.13 Protocol Configuration Options (PCO)
* 10.5.6.3 Protocol configuration options in 3GPP TS 24.008
/* 8.13 Protocol Configuration Options (PCO)
* 10.5.6.3 Protocol configuration options in 3GPP TS 24.008
* RFC 3232 [103]
* RFC 1661 [102] */
@ -256,9 +256,9 @@ ED8(uint8_t spare1:1;,
typedef struct ogs_gtp_bearer_qos_s {
ED5(uint8_t spare1:1;,
/* See 3GPP TS 29.212[29], clause 5.3.46 Pre-emption-Capability AVP. */
uint8_t pre_emption_capability:1;,
/* See 3GPP TS 29.212[29], clause 5.3.45 Priority-Level AVP.
* PL encodes each priority level defined for the Priority-Level AVP
uint8_t pre_emption_capability:1;,
/* See 3GPP TS 29.212[29], clause 5.3.45 Priority-Level AVP.
* PL encodes each priority level defined for the Priority-Level AVP
* as the binary value of the priority level. */
uint8_t priority_level:4;,
uint8_t spare2:1;,
@ -272,7 +272,7 @@ ED5(uint8_t spare1:1;,
uint64_t ul_gbr;
uint64_t dl_gbr;
/* NOTE : The encoding in 3GPP TS 24.301 [23] and 3GPP TS 36.413 [10]
/* NOTE : The encoding in 3GPP TS 24.301 [23] and 3GPP TS 36.413 [10]
* is different from the encoding within this specification. */
} __attribute__ ((packed)) ogs_gtp_bearer_qos_t;
@ -292,7 +292,7 @@ typedef struct ogs_gtp_flow_qos_s {
uint64_t ul_gbr;
uint64_t dl_gbr;
/* NOTE : The encoding in 3GPP TS 24.301 [23] and 3GPP TS 36.413 [10]
/* NOTE : The encoding in 3GPP TS 24.301 [23] and 3GPP TS 36.413 [10]
* is different from the encoding within this specification. */
} __attribute__ ((packed)) ogs_gtp_flow_qos_t;
@ -316,7 +316,7 @@ int16_t ogs_gtp_build_flow_qos(ogs_tlv_octet_t *octet,
#define OGS_GTP_RAT_TYPE_VIRTUAL 7
#define OGS_GTP_RAT_TYPE_EUTRAN_NB_IOT 8
/* 8.19 EPS Bearer Level Traffic Flow Template (Bearer TFT)
/* 8.19 EPS Bearer Level Traffic Flow Template (Bearer TFT)
* See subclause 10.5.6.12 in 3GPP TS 24.008 [13]. */
#define OGS_GTP_MAX_TRAFFIC_FLOW_TEMPLATE 255
@ -482,15 +482,15 @@ ED3(uint8_t ipv4:1;,
#define OGS_GTP_UE_TIME_ZONE_1_HOUR_FOR_DAYLIGHT_SAVING_TIME 1
#define OGS_GTP_UE_TIME_ZONE_2_HOUR_FOR_DAYLIGHT_SAVING_TIME 2
/* Time Zone" IE in 3GPP TS 24.008 [5].
* This field uses the same format as the Timezone field used in the
* TP-Service-Centre-Time-Stamp, which is defined in 3GPP TS 23.040 [90],
* This field uses the same format as the Timezone field used in the
* TP-Service-Centre-Time-Stamp, which is defined in 3GPP TS 23.040 [90],
* and its value shall be set as defined in 3GPP TS 22.042 */
typedef struct ogs_gtp_ue_timezone_s {
#define OGS_GTP_TIME_TO_BCD(x) OGS_TIME_TO_BCD(x)
/* The Time Zone indicates the difference, expressed in quarters of an hour,
* between the local time and GMT. In the first of the two semi-octets,
* the first bit (bit 3 of the seventh octet of
* the TP-Service-Centre-Time-Stamp field) represents
* between the local time and GMT. In the first of the two semi-octets,
* the first bit (bit 3 of the seventh octet of
* the TP-Service-Centre-Time-Stamp field) represents
* the algebraic sign of this difference (0: positive, 1: negative). */
uint8_t timezone;
ED2(uint8_t spare:6;,

View File

@ -57,9 +57,9 @@ const char *smf_event_get_name(smf_event_t *e)
return OGS_FSM_NAME_INIT_SIG;
switch (e->id) {
case OGS_FSM_ENTRY_SIG:
case OGS_FSM_ENTRY_SIG:
return OGS_FSM_NAME_ENTRY_SIG;
case OGS_FSM_EXIT_SIG:
case OGS_FSM_EXIT_SIG:
return OGS_FSM_NAME_EXIT_SIG;
case SMF_EVT_S5C_MESSAGE:
@ -90,7 +90,7 @@ const char *smf_event_get_name(smf_event_t *e)
case SMF_EVT_5GSM_TIMER:
return "SMF_EVT_5GSM_TIMER";
default:
default:
break;
}

View File

@ -20,8 +20,8 @@
#include "fd-path.h"
static struct session_handler *smf_gx_reg = NULL;
static struct disp_hdl *hdl_gx_fb = NULL;
static struct disp_hdl *hdl_gx_rar = NULL;
static struct disp_hdl *hdl_gx_fb = NULL;
static struct disp_hdl *hdl_gx_rar = NULL;
struct sess_state {
os0_t gx_sid; /* Gx Session-Id */
@ -118,7 +118,7 @@ void smf_gx_send_ccr(smf_sess_t *sess, ogs_gtp_xact_t *xact,
} else {
/* Create a new session */
#define OGS_DIAM_GX_APP_SID_OPT "app_gx"
ret = fd_msg_new_session(req, (os0_t)OGS_DIAM_GX_APP_SID_OPT,
ret = fd_msg_new_session(req, (os0_t)OGS_DIAM_GX_APP_SID_OPT,
CONSTSTRLEN(OGS_DIAM_GX_APP_SID_OPT));
ogs_assert(ret == 0);
ret = fd_msg_sess_get(fd_g_config->cnf_dict, req, &session, NULL);
@ -146,7 +146,7 @@ void smf_gx_send_ccr(smf_sess_t *sess, ogs_gtp_xact_t *xact,
} else
ogs_debug(" Retrieve session: [%s]", sess_data->gx_sid);
/*
/*
* 8.2. CC-Request-Number AVP
*
* The CC-Request-Number AVP (AVP Code 415) is of type Unsigned32 and
@ -167,7 +167,7 @@ void smf_gx_send_ccr(smf_sess_t *sess, ogs_gtp_xact_t *xact,
else
sess_data->cc_request_number++;
ogs_debug(" CC Request Type[%d] Number[%d]",
ogs_debug(" CC Request Type[%d] Number[%d]",
sess_data->cc_request_type, sess_data->cc_request_number);
ogs_assert(sess_data->cc_request_number <= MAX_CC_REQUEST_NUMBER);
@ -178,7 +178,7 @@ void smf_gx_send_ccr(smf_sess_t *sess, ogs_gtp_xact_t *xact,
/* Set Origin-Host & Origin-Realm */
ret = fd_msg_add_origin(req, 0);
ogs_assert(ret == 0);
/* Set the Destination-Realm AVP */
ret = fd_msg_avp_new(ogs_diam_destination_realm, 0, &avp);
ogs_assert(ret == 0);
@ -298,7 +298,7 @@ void smf_gx_send_ccr(smf_sess_t *sess, ogs_gtp_xact_t *xact,
ogs_assert(ret == 0);
memcpy(&paa, &sess->session.paa, OGS_PAA_IPV6_LEN);
#define FRAMED_IPV6_PREFIX_LENGTH 128 /* from spec document */
paa.len = FRAMED_IPV6_PREFIX_LENGTH;
paa.len = FRAMED_IPV6_PREFIX_LENGTH;
val.os.data = (uint8_t*)&paa;
val.os.len = OGS_PAA_IPV6_LEN;
ret = fd_msg_avp_setvalue(avp, &val);
@ -364,7 +364,7 @@ void smf_gx_send_ccr(smf_sess_t *sess, ogs_gtp_xact_t *xact,
ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1);
ogs_assert(ret == 0);
}
if (sess->session.ambr.downlink) {
ret = fd_msg_avp_new(
ogs_diam_gx_apn_aggregate_max_bitrate_dl, 0, &avpch1);
@ -595,18 +595,18 @@ void smf_gx_send_ccr(smf_sess_t *sess, ogs_gtp_xact_t *xact,
ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp);
ogs_assert(ret == 0);
}
ret = clock_gettime(CLOCK_REALTIME, &sess_data->ts);
/* Keep a pointer to the session data for debug purpose,
/* Keep a pointer to the session data for debug purpose,
* in real life we would not need it */
svg = sess_data;
/* Store this value in the session */
ret = fd_sess_state_store(smf_gx_reg, session, &sess_data);
ogs_assert(ret == 0);
ogs_assert(sess_data == NULL);
/* Send the request */
ret = fd_msg_send(&req, smf_gx_cca_cb, svg);
ogs_assert(ret == 0);
@ -640,7 +640,7 @@ static void smf_gx_cca_cb(void *data, struct msg **msg)
uint32_t cc_request_number = 0;
ogs_debug("[Credit-Control-Answer]");
ret = clock_gettime(CLOCK_REALTIME, &ts);
ogs_assert(ret == 0);
@ -650,7 +650,7 @@ static void smf_gx_cca_cb(void *data, struct msg **msg)
ogs_assert(new == 0);
ogs_debug(" Search the session");
ret = fd_sess_state_retrieve(smf_gx_reg, session, &sess_data);
ogs_assert(ret == 0);
ogs_assert(sess_data);
@ -688,7 +688,7 @@ static void smf_gx_cca_cb(void *data, struct msg **msg)
/* Set Credit Control Command */
memset(gx_message, 0, gxbuf_len);
gx_message->cmd_code = OGS_DIAM_GX_CMD_CODE_CREDIT_CONTROL;
/* Value of Result Code */
ret = fd_msg_search_avp(*msg, ogs_diam_result_code, &avp);
ogs_assert(ret == 0);
@ -957,11 +957,11 @@ out:
/* Free the message */
ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
if (ogs_diam_logger_self()->stats.nb_recv) {
/* Ponderate in the avg */
ogs_diam_logger_self()->stats.avg = (ogs_diam_logger_self()->stats.avg *
ogs_diam_logger_self()->stats.avg = (ogs_diam_logger_self()->stats.avg *
ogs_diam_logger_self()->stats.nb_recv + dur) /
(ogs_diam_logger_self()->stats.nb_recv + 1);
/* Min, max */
@ -976,22 +976,22 @@ out:
}
if (error)
ogs_diam_logger_self()->stats.nb_errs++;
else
else
ogs_diam_logger_self()->stats.nb_recv++;
ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
/* Display how long it took */
if (ts.tv_nsec > sess_data->ts.tv_nsec)
ogs_trace("in %d.%06ld sec",
ogs_trace("in %d.%06ld sec",
(int)(ts.tv_sec - sess_data->ts.tv_sec),
(long)(ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
else
ogs_trace("in %d.%06ld sec",
ogs_trace("in %d.%06ld sec",
(int)(ts.tv_sec + 1 - sess_data->ts.tv_sec),
(long)(1000000000 + ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
ogs_debug(" CC-Request-Type[%d] Number[%d] in Session Data",
ogs_debug(" CC-Request-Type[%d] Number[%d] in Session Data",
sess_data->cc_request_type, sess_data->cc_request_number);
ogs_debug(" Current CC-Request-Number[%d]", cc_request_number);
if (sess_data->cc_request_type ==
@ -1009,20 +1009,20 @@ out:
ret = fd_msg_free(*msg);
ogs_assert(ret == 0);
*msg = NULL;
return;
}
static int smf_gx_fb_cb(struct msg **msg, struct avp *avp,
static int smf_gx_fb_cb(struct msg **msg, struct avp *avp,
struct session *sess, void *opaque, enum disp_action *act)
{
/* This CB should never be called */
ogs_warn("Unexpected message received!");
return ENOTSUP;
}
static int smf_gx_rar_cb( struct msg **msg, struct avp *avp,
static int smf_gx_rar_cb( struct msg **msg, struct avp *avp,
struct session *session, void *opaque, enum disp_action *act)
{
int rv;
@ -1042,7 +1042,7 @@ static int smf_gx_rar_cb( struct msg **msg, struct avp *avp,
uint32_t result_code = OGS_DIAM_UNKNOWN_SESSION_ID;
int error = 0;
ogs_assert(msg);
ogs_debug("Re-Auth-Request");

View File

@ -527,7 +527,7 @@ void smf_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_assert_if_reached();
END
break;
DEFAULT
ogs_error("Invalid resource name [%s]",
sbi_message.h.resource.component[0]);