suricata
app-layer-dnp3-objects.c File Reference
Include dependency graph for app-layer-dnp3-objects.c:

Go to the source code of this file.

Functions

void DNP3FreeObjectPoint (int group, int variation, void *point)
 
DNP3PointList * DNP3PointListAlloc (void)
 Allocate a list for DNP3 points. More...
 
void DNP3FreeObjectPointList (int group, int variation, DNP3PointList *list)
 Free a DNP3PointList. More...
 
int DNP3DecodeObject (int group, int variation, const uint8_t **buf, uint32_t *len, uint8_t prefix_code, uint32_t start, uint32_t count, DNP3PointList *points)
 Decode a DNP3 object. More...
 

Detailed Description

Author
Jason Ish jason.nosp@m..ish.nosp@m.@oisf.nosp@m..net

This file contains the DNP3 object decoders.

Definition in file app-layer-dnp3-objects.c.

Function Documentation

int DNP3DecodeObject ( int  group,
int  variation,
const uint8_t **  buf,
uint32_t *  len,
uint8_t  prefix_code,
uint32_t  start,
uint32_t  count,
DNP3PointList *  points 
)

Decode a DNP3 object.

Return values
0on success. On failure a positive integer corresponding to a DNP3 application layer event will be returned.

Definition at line 8588 of file app-layer-dnp3-objects.c.

References DNP3_DECODER_EVENT_MALFORMED, DNP3_DECODER_EVENT_UNKNOWN_OBJECT, and DNP3_OBJECT_CODE.

void DNP3FreeObjectPointList ( int  group,
int  variation,
DNP3PointList *  list 
)

Free a DNP3PointList.

Definition at line 58 of file app-layer-dnp3-objects.c.

References DNP3ObjectG120V7_::association_id, DNP3ObjectG121V1_::association_id, DNP3ObjectG122V1_::association_id, DNP3ObjectG122V2_::association_id, DNP3ObjectG70V1_::attribute_code, DNP3ObjectG70V2_::authentication_key, DNP3ObjectG70V3_::authentication_key, DNP3ObjectG70V5_::block_number, DNP3ObjectG70V6_::block_number, DNP3ObjectG120V8_::certificate, DNP3ObjectG120V8_::certificate_len, DNP3ObjectG120V8_::certificate_type, DNP3ObjectG120V10_::certification_data, DNP3ObjectG120V10_::certification_data_len, DNP3ObjectG120V1_::challenge_data, DNP3ObjectG120V5_::challenge_data, DNP3ObjectG120V12_::challenge_data, DNP3ObjectG120V1_::challenge_data_len, DNP3ObjectG120V5_::challenge_data_len, DNP3ObjectG120V12_::challenge_data_len, DNP3ObjectG43V5_::commanded_value, DNP3ObjectG43V6_::commanded_value, DNP3ObjectG43V7_::commanded_value, DNP3ObjectG43V8_::commanded_value, DNP3ObjectG41V1_::control_status, DNP3ObjectG41V2_::control_status, DNP3ObjectG41V3_::control_status, DNP3ObjectG41V4_::control_status, DNP3ObjectG12V1_::count, DNP3ObjectG12V2_::count, DNP3ObjectG20V1_::count, DNP3ObjectG20V2_::count, DNP3ObjectG20V3_::count, DNP3ObjectG20V4_::count, DNP3ObjectG20V5_::count, DNP3ObjectG20V6_::count, DNP3ObjectG20V7_::count, DNP3ObjectG20V8_::count, DNP3ObjectG21V1_::count, DNP3ObjectG21V2_::count, DNP3ObjectG21V3_::count, DNP3ObjectG21V4_::count, DNP3ObjectG21V5_::count, DNP3ObjectG21V6_::count, DNP3ObjectG21V7_::count, DNP3ObjectG21V8_::count, DNP3ObjectG21V9_::count, DNP3ObjectG21V10_::count, DNP3ObjectG21V11_::count, DNP3ObjectG21V12_::count, DNP3ObjectG22V1_::count, DNP3ObjectG22V2_::count, DNP3ObjectG22V3_::count, DNP3ObjectG22V4_::count, DNP3ObjectG22V5_::count, DNP3ObjectG22V6_::count, DNP3ObjectG22V7_::count, DNP3ObjectG22V8_::count, DNP3ObjectG23V1_::count, DNP3ObjectG23V2_::count, DNP3ObjectG23V3_::count, DNP3ObjectG23V4_::count, DNP3ObjectG23V5_::count, DNP3ObjectG23V6_::count, DNP3ObjectG23V7_::count, DNP3ObjectG23V8_::count, DNP3ObjectG121V1_::count_value, DNP3ObjectG122V1_::count_value, DNP3ObjectG122V2_::count_value, DNP3ObjectG70V3_::created, DNP3ObjectG70V1_::created_timestamp, DNP3ObjectG70V7_::created_timestamp, DNP3ObjectG120V1_::csq, DNP3ObjectG120V2_::csq, DNP3ObjectG120V3_::csq, DNP3Point_::data, DNP3ObjectG70V1_::data, DNP3ObjectG83V1_::data_objects, DNP3ObjectG70V1_::data_size, DNP3ObjectG34V1_::deadband_value, DNP3ObjectG34V2_::deadband_value, DNP3ObjectG34V3_::deadband_value, DNP3ObjectG52V2_::delay_ms, DNP3ObjectG52V1_::delay_secs, DNP3ObjectG120V14_::digital_signature, DNP3ObjectG120V14_::digital_signature_len, DNP3_SWAP16, DNP3_SWAP32, DNP3FreeObjectPoint(), DNP3PrefixIsSize(), DNP3ObjectG120V13_::encrypted_update_key_data, DNP3ObjectG120V13_::encrypted_update_key_len, DNP3ObjectG70V1_::end_record, DNP3ObjectG120V7_::error_code, DNP3ObjectG120V7_::error_text, DNP3ObjectG120V7_::error_text_len, DNP3ObjectG70V5_::file_data, DNP3ObjectG70V5_::file_data_len, DNP3ObjectG70V1_::file_function_code, DNP3ObjectG70V4_::file_handle, DNP3ObjectG70V5_::file_handle, DNP3ObjectG70V6_::file_handle, DNP3ObjectG70V1_::file_id, DNP3ObjectG70V1_::file_size, DNP3ObjectG70V3_::file_size, DNP3ObjectG70V4_::file_size, DNP3ObjectG70V7_::file_size, DNP3ObjectG70V8_::file_specification, DNP3ObjectG70V8_::file_specification_len, DNP3ObjectG70V7_::file_type, DNP3ObjectG70V1_::filename, DNP3ObjectG70V3_::filename, DNP3ObjectG70V7_::filename, DNP3ObjectG70V3_::filename_offset, DNP3ObjectG70V7_::filename_offset, DNP3ObjectG70V1_::filename_size, DNP3ObjectG70V3_::filename_size, DNP3ObjectG70V7_::filename_size, DNP3ObjectG70V1_::filetype_code, DNP3ObjectG81V1_::group, DNP3ObjectG70V1_::group_id, DNP3Point_::index, DNP3ObjectG50V2_::interval, DNP3ObjectG50V4_::interval_count, DNP3ObjectG50V4_::interval_units, DNP3ObjectG120V8_::key_change_method, DNP3ObjectG120V10_::key_change_method, DNP3ObjectG120V11_::key_change_method, DNP3ObjectG120V5_::key_status, DNP3ObjectG120V5_::key_wrap_alg, DNP3ObjectG120V5_::ksq, DNP3ObjectG120V6_::ksq, DNP3ObjectG120V12_::ksq, DNP3ObjectG120V13_::ksq, len, length, DNP3ObjectG83V1_::length, DNP3ObjectG120V15_::mac, DNP3ObjectG120V15_::mac_len, DNP3ObjectG120V2_::mac_value, DNP3ObjectG120V5_::mac_value, DNP3ObjectG120V9_::mac_value, DNP3ObjectG120V2_::mac_value_len, DNP3ObjectG120V5_::mac_value_len, DNP3ObjectG120V9_::mac_value_len, DNP3ObjectG120V1_::mal, DNP3ObjectG120V5_::mal, DNP3ObjectG120V11_::master_challenge_data, DNP3ObjectG120V11_::master_challenge_data_len, DNP3ObjectG70V3_::maximum_block_size, DNP3ObjectG70V4_::maximum_block_size, next, DNP3ObjectG83V1_::object_id, offset, DNP3ObjectG12V1_::offtime, DNP3ObjectG12V2_::offtime, DNP3ObjectG12V1_::ontime, DNP3ObjectG12V2_::ontime, DNP3ObjectG120V10_::operation, DNP3ObjectG70V3_::operational_mode, DNP3ObjectG70V4_::optional_text, DNP3ObjectG70V6_::optional_text, DNP3ObjectG70V4_::optional_text_len, DNP3ObjectG70V6_::optional_text_len, DNP3ObjectG70V1_::owner_id, DNP3ObjectG70V2_::password, DNP3ObjectG70V2_::password_offset, DNP3ObjectG70V2_::password_size, DNP3ObjectG70V1_::permission, DNP3ObjectG70V3_::permissions, DNP3ObjectG70V7_::permissions, DNP3Point_::prefix, DNP3ObjectG120V1_::reason, DNP3ObjectG4V3_::relative_time_ms, DNP3ObjectG70V3_::request_id, DNP3ObjectG70V4_::request_id, DNP3ObjectG70V7_::request_id, SCCalloc, SCFree, DNP3ObjectG120V10_::scs, DNP3ObjectG120V7_::sequence_number, DNP3Point_::size, DNP3ObjectG70V1_::start_record, DNP3ObjectG2V1_::state, DNP3ObjectG70V1_::status_code, DNP3ObjectG70V4_::status_code, DNP3ObjectG70V6_::status_code, TAILQ_FIRST, TAILQ_INSERT_TAIL, TAILQ_REMOVE, DNP3ObjectG120V7_::time_of_error, DNP3ObjectG2V2_::timestamp, DNP3ObjectG2V3_::timestamp, DNP3ObjectG4V2_::timestamp, DNP3ObjectG11V2_::timestamp, DNP3ObjectG13V2_::timestamp, DNP3ObjectG21V5_::timestamp, DNP3ObjectG21V6_::timestamp, DNP3ObjectG21V7_::timestamp, DNP3ObjectG21V8_::timestamp, DNP3ObjectG22V5_::timestamp, DNP3ObjectG22V6_::timestamp, DNP3ObjectG22V7_::timestamp, DNP3ObjectG22V8_::timestamp, DNP3ObjectG23V5_::timestamp, DNP3ObjectG23V6_::timestamp, DNP3ObjectG23V7_::timestamp, DNP3ObjectG23V8_::timestamp, DNP3ObjectG31V3_::timestamp, DNP3ObjectG31V4_::timestamp, DNP3ObjectG32V3_::timestamp, DNP3ObjectG32V4_::timestamp, DNP3ObjectG32V7_::timestamp, DNP3ObjectG32V8_::timestamp, DNP3ObjectG33V3_::timestamp, DNP3ObjectG33V4_::timestamp, DNP3ObjectG33V7_::timestamp, DNP3ObjectG33V8_::timestamp, DNP3ObjectG42V3_::timestamp, DNP3ObjectG42V4_::timestamp, DNP3ObjectG42V7_::timestamp, DNP3ObjectG42V8_::timestamp, DNP3ObjectG43V3_::timestamp, DNP3ObjectG43V4_::timestamp, DNP3ObjectG43V7_::timestamp, DNP3ObjectG43V8_::timestamp, DNP3ObjectG50V1_::timestamp, DNP3ObjectG50V2_::timestamp, DNP3ObjectG50V3_::timestamp, DNP3ObjectG50V4_::timestamp, DNP3ObjectG51V1_::timestamp, DNP3ObjectG51V2_::timestamp, DNP3ObjectG122V2_::timestamp, unlikely, DNP3ObjectG120V3_::user_number, DNP3ObjectG120V4_::user_number, DNP3ObjectG120V5_::user_number, DNP3ObjectG120V12_::user_number, DNP3ObjectG120V13_::user_number, DNP3ObjectG120V10_::user_public_key, DNP3ObjectG120V10_::user_public_key_len, DNP3ObjectG120V10_::user_role, DNP3ObjectG120V10_::user_role_expiry_interval, DNP3ObjectG70V2_::username, DNP3ObjectG120V10_::username, DNP3ObjectG120V11_::username, DNP3ObjectG120V10_::username_len, DNP3ObjectG120V11_::username_len, DNP3ObjectG70V2_::username_offset, DNP3ObjectG70V2_::username_size, DNP3ObjectG120V1_::usr, DNP3ObjectG120V2_::usr, DNP3ObjectG120V6_::usr, DNP3ObjectG120V7_::usr, DNP3ObjectG30V3_::value, DNP3ObjectG30V4_::value, DNP3ObjectG30V5_::value, DNP3ObjectG30V6_::value, DNP3ObjectG31V5_::value, DNP3ObjectG31V6_::value, DNP3ObjectG31V7_::value, DNP3ObjectG31V8_::value, DNP3ObjectG32V5_::value, DNP3ObjectG32V6_::value, DNP3ObjectG32V7_::value, DNP3ObjectG32V8_::value, DNP3ObjectG33V5_::value, DNP3ObjectG33V6_::value, DNP3ObjectG33V7_::value, DNP3ObjectG33V8_::value, DNP3ObjectG40V3_::value, DNP3ObjectG40V4_::value, DNP3ObjectG41V1_::value, DNP3ObjectG41V2_::value, DNP3ObjectG41V3_::value, DNP3ObjectG41V4_::value, DNP3ObjectG42V5_::value, DNP3ObjectG42V6_::value, DNP3ObjectG42V7_::value, DNP3ObjectG42V8_::value, DNP3ObjectG102V1_::value, DNP3ObjectG81V1_::variation, DNP3ObjectG83V1_::vendor_code, DNP3ObjectG120V6_::wrapped_key_data, and DNP3ObjectG120V6_::wrapped_key_data_len.

Here is the call graph for this function:

DNP3PointList* DNP3PointListAlloc ( void  )

Allocate a list for DNP3 points.

Definition at line 45 of file app-layer-dnp3-objects.c.

References SCCalloc, TAILQ_INIT, and unlikely.