Commit e90b12f0 authored by Rohan's avatar Rohan
Browse files

clang formatting

parent 2f944389
......@@ -124,7 +124,7 @@ class pfcp_ie : public stream_serializable {
static pfcp_ie* new_pfcp_ie_from_stream(std::istream& is);
//from SPGWC
// from SPGWC
static bool string_to_dotted(const std::string& str, std::string& dotted) {
uint8_t offset = 0;
uint8_t* last_size;
......@@ -609,35 +609,33 @@ class pfcp_enterprise_specific_ie : public pfcp_ie {
uint16_t enterprise_id;
std::string proprietary_data;
//--------
//--------
explicit pfcp_enterprise_specific_ie(const pfcp::enterprise_specific_t& b)
: pfcp_ie(PFCP_IE_ENTERPRISE_SPECIFIC) {
enterprise_id = b.enterprise_id;
enterprise_id = b.enterprise_id;
proprietary_data = b.proprietary_data;
tlv.set_length(2 + proprietary_data.size());
}
//--------
pfcp_enterprise_specific_ie() : pfcp_ie(PFCP_IE_ENTERPRISE_SPECIFIC) {
enterprise_id = 0;
enterprise_id = 0;
proprietary_data = {};
tlv.set_length(2);
}
// --------
explicit pfcp_enterprise_specific_ie(const pfcp_tlv& t)
: pfcp_ie(t),
enterprise_id(0),
proprietary_data(){};
explicit pfcp_enterprise_specific_ie(const pfcp_tlv& t)
: pfcp_ie(t), enterprise_id(0), proprietary_data(){};
//--------
void to_core_type(pfcp::enterprise_specific_t& b) {
b.enterprise_id = enterprise_id;
b.enterprise_id = enterprise_id;
b.proprietary_data = proprietary_data;
}
//--------
void dump_to(std::ostream& os) {
tlv.dump_to(os);
os.write(reinterpret_cast<const char*>(&enterprise_id),
sizeof(enterprise_id));
os.write(
reinterpret_cast<const char*>(&enterprise_id), sizeof(enterprise_id));
os << enterprise_id;
}
//--------
......@@ -647,9 +645,8 @@ class pfcp_enterprise_specific_ie : public pfcp_ie {
throw pfcp_tlv_bad_length_exception(
tlv.type, tlv.get_length(), __FILE__, __LINE__);
}
is.read(reinterpret_cast<char*>(&enterprise_id),
sizeof(enterprise_id));
is.read(reinterpret_cast<char*>(&enterprise_id), sizeof(enterprise_id));
char e[tlv.get_length() - 2];
is.read(e, tlv.get_length() - 2);
proprietary_data.assign(e, tlv.get_length() - 2);
......
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