forked from Mirrors/sngrep
- eep: Support for EEP traffic with UUID chunks (Asterisk)
This commit is contained in:
parent
982d6e5658
commit
302429fee1
|
@ -588,9 +588,10 @@ capture_eep_receive_v3()
|
|||
#endif
|
||||
hep_chunk_t payload_chunk;
|
||||
hep_chunk_t authkey_chunk;
|
||||
hep_chunk_t uuid_chunk;
|
||||
uint8_t family, proto;
|
||||
char password[100];
|
||||
int password_len;
|
||||
int password_len, uuid_len;
|
||||
unsigned char *payload = 0;
|
||||
uint32_t len, pos;
|
||||
char buffer[MAX_CAPTURE_LEN] ;
|
||||
|
@ -674,6 +675,14 @@ capture_eep_receive_v3()
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (setting_enabled(SETTING_EEP_LISTEN_UUID)) {
|
||||
memcpy(&uuid_chunk, (void*) buffer + pos, sizeof(uuid_chunk));
|
||||
pos += sizeof(uuid_chunk);
|
||||
|
||||
uuid_len = ntohs(uuid_chunk.length) - sizeof(uuid_chunk);
|
||||
pos += uuid_len;
|
||||
}
|
||||
|
||||
/* Payload */
|
||||
memcpy(&payload_chunk, (void*) buffer + pos, sizeof(payload_chunk));
|
||||
pos += sizeof(payload_chunk);
|
||||
|
|
|
@ -87,6 +87,7 @@ settings_entry_t entries[] = {
|
|||
{ CAT_SETTINGS_EEP_HOMER, FLD_SETTINGS_EEP_LISTEN_ADDR, SETTING_EEP_LISTEN_ADDR, "Listen EEP packet address ................." },
|
||||
{ CAT_SETTINGS_EEP_HOMER, FLD_SETTINGS_EEP_LISTEN_PORT, SETTING_EEP_LISTEN_PORT, "Listen EEP packet port ...................." },
|
||||
{ CAT_SETTINGS_EEP_HOMER, FLD_SETTINGS_EEP_LISTEN_PASS, SETTING_EEP_LISTEN_PASS, "EEP server password ......................." },
|
||||
{ CAT_SETTINGS_EEP_HOMER, FLD_SETTINGS_EEP_LISTEN_UUID, SETTING_EEP_LISTEN_UUID, "EEP server expects UUID (Asterisk) ........" },
|
||||
#endif
|
||||
{ 0 , 0, 0, NULL },
|
||||
};
|
||||
|
@ -100,7 +101,7 @@ settings_create(ui_t *ui)
|
|||
int field = 0;
|
||||
|
||||
// Cerate a new window for the panel and form
|
||||
ui_panel_create(ui, 22, 70);
|
||||
ui_panel_create(ui, 24, 70);
|
||||
|
||||
// Initialize Filter panel specific data
|
||||
info = sng_malloc(sizeof(settings_info_t));
|
||||
|
|
|
@ -119,6 +119,8 @@ enum settings_field_list {
|
|||
FLD_SETTINGS_EEP_LISTEN_PORT_LB,
|
||||
FLD_SETTINGS_EEP_LISTEN_PASS,
|
||||
FLD_SETTINGS_EEP_LISTEN_PASS_LB,
|
||||
FLD_SETTINGS_EEP_LISTEN_UUID,
|
||||
FLD_SETTINGS_EEP_LISTEN_UUID_LB,
|
||||
#endif
|
||||
FLD_SETTINGS_COUNT,
|
||||
};
|
||||
|
|
|
@ -85,6 +85,7 @@ setting_t settings[SETTING_COUNT] = {
|
|||
{ SETTING_EEP_LISTEN_ADDR, "eep.listen.address", SETTING_FMT_STRING, "0.0.0.0", NULL },
|
||||
{ SETTING_EEP_LISTEN_PORT, "eep.listen.port", SETTING_FMT_NUMBER, "9060", NULL },
|
||||
{ SETTING_EEP_LISTEN_PASS, "eep.listen.pass", SETTING_FMT_STRING, "myHep", NULL },
|
||||
{ SETTING_EEP_LISTEN_UUID, "eep.listen.uuid", SETTING_FMT_ENUM, SETTING_OFF, SETTING_ENUM_ONOFF },
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -121,6 +121,7 @@ enum setting_id {
|
|||
SETTING_EEP_LISTEN_ADDR,
|
||||
SETTING_EEP_LISTEN_PORT,
|
||||
SETTING_EEP_LISTEN_PASS,
|
||||
SETTING_EEP_LISTEN_UUID,
|
||||
#endif
|
||||
SETTING_COUNT
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue