forked from Mirrors/sngrep
attr: add SIP transport attribute getter
This commit is contained in:
parent
535ecc434a
commit
4c73fbaa61
|
@ -289,6 +289,13 @@ attribute_getter_msg_time(G_GNUC_UNUSED Attribute *attr, Message *msg)
|
|||
return g_strdup(timeval_to_time(msg_get_time(msg), value));
|
||||
}
|
||||
|
||||
static gchar *
|
||||
attribute_getter_msg_transport(G_GNUC_UNUSED Attribute *attr, Message *msg)
|
||||
{
|
||||
return g_strdup(packet_transport(msg->packet));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
attr_set_regex_pattern(Attribute *attr, gchar *pattern)
|
||||
{
|
||||
|
@ -374,6 +381,7 @@ attribute_init()
|
|||
|
||||
//! SIP Transport (SIP over TCP, UDP, WS, ...)
|
||||
attribute = attr_new("transport", "Trans", "Transport");
|
||||
attr_set_getter_func(attribute, attribute_getter_msg_transport);
|
||||
g_ptr_array_add(attributes, attribute);
|
||||
|
||||
//! Owner call message count
|
||||
|
|
|
@ -116,6 +116,9 @@ packet_src_address(const Packet *packet);
|
|||
Address
|
||||
packet_dst_address(const Packet *packet);
|
||||
|
||||
const char *
|
||||
packet_transport(Packet *packet);
|
||||
|
||||
/**
|
||||
* @brief Get The timestamp for a packet.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue