"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "daqs/daq_hext.c" between
snort3-3.1.28.0.tar.gz and snort3-3.1.29.0.tar.gz

About: Snort 3 is a network intrusion prevention and detection system (IDS/IPS) combining the benefits of signature, protocol and anomaly-based inspection.

daq_hext.c  (snort3-3.1.28.0):daq_hext.c  (snort3-3.1.29.0)
skipping to change at line 142 skipping to change at line 142
if (!desc->data) if (!desc->data)
{ {
SET_ERROR(hc->modinst, "%s: Could not allocate %d bytes for a packet descriptor message buffer!", SET_ERROR(hc->modinst, "%s: Could not allocate %d bytes for a packet descriptor message buffer!",
__func__, hc->snaplen); __func__, hc->snaplen);
return DAQ_ERROR_NOMEM; return DAQ_ERROR_NOMEM;
} }
pool->info.mem_size += hc->snaplen; pool->info.mem_size += hc->snaplen;
/* Initialize non-zero invariant packet header fields. */ /* Initialize non-zero invariant packet header fields. */
DAQ_PktHdr_t *pkthdr = &desc->pkthdr; DAQ_PktHdr_t *pkthdr = &desc->pkthdr;
pkthdr->address_space_id = 0;
pkthdr->ingress_index = DAQ_PKTHDR_UNKNOWN; pkthdr->ingress_index = DAQ_PKTHDR_UNKNOWN;
pkthdr->ingress_group = DAQ_PKTHDR_UNKNOWN; pkthdr->ingress_group = DAQ_PKTHDR_UNKNOWN;
pkthdr->egress_index = DAQ_PKTHDR_UNKNOWN; pkthdr->egress_index = DAQ_PKTHDR_UNKNOWN;
pkthdr->egress_group = DAQ_PKTHDR_UNKNOWN; pkthdr->egress_group = DAQ_PKTHDR_UNKNOWN;
pkthdr->flags = 0;
/* Initialize non-zero invariant message header fields. */ /* Initialize non-zero invariant message header fields. */
DAQ_Msg_t *msg = &desc->msg; DAQ_Msg_t *msg = &desc->msg;
msg->owner = hc->modinst; msg->owner = hc->modinst;
msg->priv = desc; msg->priv = desc;
/* Place it on the free list */ /* Place it on the free list */
desc->next = pool->freelist; desc->next = pool->freelist;
pool->freelist = desc; pool->freelist = desc;
skipping to change at line 263 skipping to change at line 261
"%" SCNu32 " " /* opaque */ \ "%" SCNu32 " " /* opaque */ \
"%" SCNu64 " " /* initiator_pkts */ \ "%" SCNu64 " " /* initiator_pkts */ \
"%" SCNu64 " " /* responder_pkts */ \ "%" SCNu64 " " /* responder_pkts */ \
"%" SCNu64 " " /* initiator_pkts_dropped */ \ "%" SCNu64 " " /* initiator_pkts_dropped */ \
"%" SCNu64 " " /* responder_pkts_dropped */ \ "%" SCNu64 " " /* responder_pkts_dropped */ \
"%" SCNu64 " " /* initiator_bytes_dropped */ \ "%" SCNu64 " " /* initiator_bytes_dropped */ \
"%" SCNu64 " " /* responder_bytes_dropped */ \ "%" SCNu64 " " /* responder_bytes_dropped */ \
"%" SCNu8 " " /* is_qos_applied_on_src_intf */ \ "%" SCNu8 " " /* is_qos_applied_on_src_intf */ \
"%" SCNu32 " " /* sof_timestamp.tv_sec */ \ "%" SCNu32 " " /* sof_timestamp.tv_sec */ \
"%" SCNu32 " " /* eof_timestamp.tv_sec */ \ "%" SCNu32 " " /* eof_timestamp.tv_sec */ \
"%" SCNu32 " " /* address_space_id */ \
"%" SCNu32 " " /* tenant_id */ \
"%" SCNu16 " " /* vlan_tag */ \ "%" SCNu16 " " /* vlan_tag */ \
"%" SCNu16 " " /* address_space_id */ \
"%" SCNu8 " " /* protocol */ \ "%" SCNu8 " " /* protocol */ \
"%" SCNu8 /* flags */ "%" SCNu8 /* flags */
#define FLOWSTATS_ITEMS 22 #define FLOWSTATS_ITEMS 23
DAQ_FlowStats_t* f = &desc->flowstats; DAQ_FlowStats_t* f = &desc->flowstats;
char srcaddr[INET6_ADDRSTRLEN], dstaddr[INET6_ADDRSTRLEN]; char srcaddr[INET6_ADDRSTRLEN], dstaddr[INET6_ADDRSTRLEN];
uint32_t sof_sec, eof_sec; uint32_t sof_sec, eof_sec;
int rval = sscanf(line, FLOWSTATS_FORMAT, &f->ingress_group, &f->egress_grou p, &f->ingress_intf, int rval = sscanf(line, FLOWSTATS_FORMAT, &f->ingress_group, &f->egress_grou p, &f->ingress_intf,
&f->egress_intf, srcaddr, &f->initiator_port, dstaddr, &f->responder _port, &f->opaque, &f->egress_intf, srcaddr, &f->initiator_port, dstaddr, &f->responder _port, &f->opaque,
&f->initiator_pkts, &f->responder_pkts, &f->initiator_pkts_dropped, &f->responder_pkts_dropped, &f->initiator_pkts, &f->responder_pkts, &f->initiator_pkts_dropped, &f->responder_pkts_dropped,
&f->initiator_bytes_dropped, &f->responder_bytes_dropped, &f->is_qos _applied_on_src_intf, &f->initiator_bytes_dropped, &f->responder_bytes_dropped, &f->is_qos _applied_on_src_intf,
&sof_sec, &eof_sec, &f->vlan_tag, &f->address_space_id, &sof_sec, &eof_sec, &f->address_space_id, &f->tenant_id, &f->vlan_ta g,
&f->protocol, &f->flags); &f->protocol, &f->flags);
if (rval != FLOWSTATS_ITEMS) if (rval != FLOWSTATS_ITEMS)
return false; return false;
f->sof_timestamp.tv_sec = sof_sec; f->sof_timestamp.tv_sec = sof_sec;
f->eof_timestamp.tv_sec = eof_sec; f->eof_timestamp.tv_sec = eof_sec;
desc->msg.type = type; desc->msg.type = type;
desc->msg.hdr_len = sizeof(desc->flowstats); desc->msg.hdr_len = sizeof(desc->flowstats);
desc->msg.hdr = &desc->flowstats; desc->msg.hdr = &desc->flowstats;
 End of changes. 6 change blocks. 
5 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)