stream_set_getp(s, sp);
}
-/* Expects header to be in host order */
-void ospf_ip_header_dump(struct ip *iph)
-{
- /* IP Header dump. */
- zlog_debug("ip_v %d", iph->ip_v);
- zlog_debug("ip_hl %d", iph->ip_hl);
- zlog_debug("ip_tos %d", iph->ip_tos);
- zlog_debug("ip_len %d", iph->ip_len);
- zlog_debug("ip_id %u", (uint32_t)iph->ip_id);
- zlog_debug("ip_off %u", (uint32_t)iph->ip_off);
- zlog_debug("ip_ttl %d", iph->ip_ttl);
- zlog_debug("ip_p %d", iph->ip_p);
- zlog_debug("ip_sum 0x%x", (uint32_t)iph->ip_sum);
- zlog_debug("ip_src %s", inet_ntoa(iph->ip_src));
- zlog_debug("ip_dst %s", inet_ntoa(iph->ip_dst));
-}
-
static void ospf_header_dump(struct ospf_header *ospfh)
{
char buf[9];
extern void ospf_nbr_state_message(struct ospf_neighbor *, char *, size_t);
extern const char *ospf_timer_dump(struct thread *, char *, size_t);
extern const char *ospf_timeval_dump(struct timeval *, char *, size_t);
-extern void ospf_ip_header_dump(struct ip *);
extern void ospf_packet_dump(struct stream *);
extern void ospf_debug_init(void);
"ospf_write_frags: sent id %d, off %d, len %d to %s\n",
iph->ip_id, iph->ip_off, iph->ip_len,
inet_ntoa(iph->ip_dst));
- if (IS_DEBUG_OSPF_PACKET(type - 1, DETAIL)) {
- zlog_debug(
- "-----------------IP Header Dump----------------------");
- ospf_ip_header_dump(iph);
- zlog_debug(
- "-----------------------------------------------------");
- }
}
iph->ip_off += offset;
if (IS_DEBUG_OSPF_PACKET(type - 1, DETAIL)) {
zlog_debug(
"-----------------------------------------------------");
- ospf_ip_header_dump(&iph);
stream_set_getp(op->s, 0);
ospf_packet_dump(op->s);
}
}
}
- /* IP Header dump. */
- if (IS_DEBUG_OSPF_PACKET(0, RECV))
- ospf_ip_header_dump(iph);
-
/* Self-originated packet should be discarded silently. */
if (ospf_if_lookup_by_local_addr(ospf, NULL, iph->ip_src)) {
if (IS_DEBUG_OSPF_PACKET(0, RECV)) {