p->icmpv4vars.emb_ip4_proto = IPPROTO_TCP;
SCLogDebug("DecodePartialIPV4: ICMPV4->IPV4->TCP header sport: "
- "%"PRIu8" dport %"PRIu8"", p->icmpv4vars.emb_sport,
+ "%"PRIu16" dport %"PRIu16"", p->icmpv4vars.emb_sport,
p->icmpv4vars.emb_dport);
} else if (len >= IPV4_HEADER_LEN + 4) {
/* only access th_sport and th_dport */
p->icmpv4vars.emb_dport = SCNtohs(emb_tcph->th_dport);
p->icmpv4vars.emb_ip4_proto = IPPROTO_TCP;
SCLogDebug("DecodePartialIPV4: ICMPV4->IPV4->TCP partial header sport: "
- "%"PRIu8" dport %"PRIu8"", p->icmpv4vars.emb_sport,
+ "%"PRIu16" dport %"PRIu16"", p->icmpv4vars.emb_sport,
p->icmpv4vars.emb_dport);
} else {
SCLogDebug("DecodePartialIPV4: Warning, ICMPV4->IPV4->TCP "
p->icmpv4vars.emb_ip4_proto = IPPROTO_UDP;
SCLogDebug("DecodePartialIPV4: ICMPV4->IPV4->UDP header sport: "
- "%"PRIu8" dport %"PRIu8"", p->icmpv4vars.emb_sport,
+ "%"PRIu16" dport %"PRIu16"", p->icmpv4vars.emb_sport,
p->icmpv4vars.emb_dport);
} else {
SCLogDebug("DecodePartialIPV4: Warning, ICMPV4->IPV4->UDP "
p->icmpv6vars.emb_dport = p->icmpv6vars.emb_tcph->th_dport;
SCLogDebug("ICMPV6->IPV6->TCP header sport: "
- "%"PRIu8" dport %"PRIu8"", p->icmpv6vars.emb_sport,
+ "%"PRIu16" dport %"PRIu16"", p->icmpv6vars.emb_sport,
p->icmpv6vars.emb_dport);
} else {
SCLogDebug("Warning, ICMPV6->IPV6->TCP "
p->icmpv6vars.emb_dport = p->icmpv6vars.emb_udph->uh_dport;
SCLogDebug("ICMPV6->IPV6->UDP header sport: "
- "%"PRIu8" dport %"PRIu8"", p->icmpv6vars.emb_sport,
+ "%"PRIu16" dport %"PRIu16"", p->icmpv6vars.emb_sport,
p->icmpv6vars.emb_dport);
} else {
SCLogDebug("Warning, ICMPV6->IPV6->UDP "
/* single byte options */
if (*pkt == IPV4_OPT_EOL) {
/** \todo What if more data exist after EOL (possible covert channel or data leakage)? */
- SCLogDebug("IPV4OPT %" PRIu16 " len 1 @ %" PRIu16 "/%" PRIu16 "",
+ SCLogDebug("IPV4OPT %" PRIu8 " len 1 @ %d/%d",
*pkt, (len - plen), (len - 1));
p->ip4vars.opts_set |= IPV4_OPT_FLAG_EOL;
break;
} else if (*pkt == IPV4_OPT_NOP) {
- SCLogDebug("IPV4OPT %" PRIu16 " len 1 @ %" PRIu16 "/%" PRIu16 "",
+ SCLogDebug("IPV4OPT %" PRIu8 " len 1 @ %d/%d",
*pkt, (len - plen), (len - 1));
pkt++;
plen--;
}
if (unlikely(IP_GET_RAW_VER(pkt) != 4)) {
- SCLogDebug("wrong ip version %" PRIu8 "",IP_GET_RAW_VER(pkt));
+ SCLogDebug("wrong ip version %d",IP_GET_RAW_VER(pkt));
ENGINE_SET_INVALID_EVENT(p, IPV4_WRONG_IP_VER);
return -1;
}
IPV6_SET_L4PROTO(p,nh);
hdrextlen = 8 + (*(pkt+1) * 8); /* 8 bytes + length in 8 octet units */
- SCLogDebug("hdrextlen %"PRIu8, hdrextlen);
+ SCLogDebug("hdrextlen %"PRIu16, hdrextlen);
if (hdrextlen > plen) {
ENGINE_SET_INVALID_EVENT(p, IPV6_TRUNC_EXTHDR);
if (*(pkt+1) > 0)
hdrextlen += ((*(pkt+1) - 1) * 4);
- SCLogDebug("hdrextlen %"PRIu8, hdrextlen);
+ SCLogDebug("hdrextlen %"PRIu16, hdrextlen);
if (hdrextlen > plen) {
ENGINE_SET_INVALID_EVENT(p, IPV6_TRUNC_EXTHDR);
}
if (unlikely(IP_GET_RAW_VER(pkt) != 6)) {
- SCLogDebug("wrong ip version %" PRIu8 "",IP_GET_RAW_VER(pkt));
+ SCLogDebug("wrong ip version %d",IP_GET_RAW_VER(pkt));
ENGINE_SET_INVALID_EVENT(p, IPV6_WRONG_IP_VER);
return -1;
}
SCLogDebug("IPV6 Packet");
DecodeIPV6(tv, dtv, p, GET_PKT_DATA(p), GET_PKT_LEN(p), pq);
} else {
- SCLogDebug("Unknown ip version %" PRIu8 "", IP_GET_RAW_VER(pkt));
+ SCLogDebug("Unknown ip version %d", IP_GET_RAW_VER(pkt));
ENGINE_SET_EVENT(p,IPRAW_INVALID_IPV);
}
return TM_ECODE_OK;
int i = 0;
while (i < p->alerts.cnt) {
- SCLogDebug("Sig->num: %"PRIu16, p->alerts.alerts[i].num);
+ SCLogDebug("Sig->num: %"PRIu32, p->alerts.alerts[i].num);
const Signature *s = de_ctx->sig_array[p->alerts.alerts[i].num];
int res = PacketAlertHandle(de_ctx, det_ctx, s, p, &p->alerts.alerts[i]);
continue;
}
- SCLogDebug("Signum %"PRIu16" match (sid: %"PRIu16", msg: %s)",
+ SCLogDebug("Signum %"PRIu32" match (sid: %"PRIu32", msg: %s)",
u * 8 + i, s->id, s->msg);
if (s->sm_arrays[DETECT_SM_LIST_POSTMATCH] != NULL) {
if (dst->family == AF_INET) {
SCLogDebug("To IPv4");
- SCLogDebug("Item has netmask %"PRIu16" negated: %s; IP: %s; signum:"
- " %"PRIu16"", dst->netmask, (dst->negated)?"yes":"no",
+ SCLogDebug("Item has netmask %"PRIu8" negated: %s; IP: %s; signum:"
+ " %"PRIu32"", dst->netmask, (dst->negated)?"yes":"no",
inet_ntoa(*(struct in_addr*)&dst->ip[0]), dst->signum);
void *user_data = NULL;
targetval = sfd->target.value;
}
- SCLogDebug("Our var %s is at idx: %"PRIu16"", sfd->name, sfd->idx);
+ SCLogDebug("Our var %s is at idx: %"PRIu32"", sfd->name, sfd->idx);
if (sfd->modifier == FLOWINT_MODIFIER_SET) {
FlowVarAddIntNoLock(p->flow, sfd->idx, targetval);
SCFree(orig);
- SCLogDebug("will look for tls %"PRIu8"", tls->ver);
+ SCLogDebug("will look for tls %"PRIu16"", tls->ver);
}
return tls;
mode = DETECT_TTL_LT;
ttl1 = atoi(arg3);
- SCLogDebug("ttl is %"PRIu8"",ttl1);
+ SCLogDebug("ttl is %d",ttl1);
if (strlen(arg1) > 0)
return NULL;
mode = DETECT_TTL_GT;
ttl1 = atoi(arg3);
- SCLogDebug("ttl is %"PRIu8"",ttl1);
+ SCLogDebug("ttl is %d",ttl1);
if (strlen(arg1) > 0)
return NULL;
ttl1 = atoi(arg1);
ttl2 = atoi(arg3);
- SCLogDebug("ttl is %"PRIu8" to %"PRIu8"",ttl1, ttl2);
+ SCLogDebug("ttl is %d to %d",ttl1, ttl2);
if (ttl1 >= ttl2) {
SCLogError(SC_ERR_INVALID_SIGNATURE, "invalid ttl range");
return NULL;
#define StreamTcpSetEvent(p, e) { \
if ((p)->flags & PKT_STREAM_NO_EVENTS) { \
- SCLogDebug("not setting event %"PRIu8" on pkt %p (%"PRIu64"), " \
+ SCLogDebug("not setting event %d on pkt %p (%"PRIu64"), " \
"stream in known bad condition", (e), p, (p)->pcap_cnt); \
} else { \
- SCLogDebug("setting event %"PRIu8" on pkt %p (%"PRIu64")", \
+ SCLogDebug("setting event %d on pkt %p (%"PRIu64")", \
(e), p, (p)->pcap_cnt); \
ENGINE_SET_EVENT((p), (e)); \
} \
}
if (nprocs > UINT16_MAX) {
- SCLogDebug("It seems that there are more than %"PRIu16" CPUs "
+ SCLogDebug("It seems that there are more than %d CPUs "
"configured on this system. You can modify util-cpu.{c,h} "
"to use uint32_t to support it", UINT16_MAX);
return UINT16_MAX;
}
if (nprocs > UINT16_MAX) {
- SCLogDebug("It seems that there are more than %"PRIu16" CPUs online. "
+ SCLogDebug("It seems that there are more than %d CPUs online. "
"You can modify util-cpu.{c,h} to use uint32_t to "
"support it", UINT16_MAX);
return UINT16_MAX;