コード例 #1
0
/* For debug purpose. */
static void
rtmsg_debug (struct rt_msghdr *rtm)
{
  zlog_debug ("Kernel: Len: %d Type: %s", rtm->rtm_msglen, lookup (rtm_type_str, rtm->rtm_type));
  rtm_flag_dump (rtm->rtm_flags);
  zlog_debug ("Kernel: message seq %d", rtm->rtm_seq);
  zlog_debug ("Kernel: pid %d, rtm_addrs 0x%x", rtm->rtm_pid, rtm->rtm_addrs);
}
コード例 #2
0
/* For debug purpose. */
void
rtmsg_debug (struct rt_msghdr *rtm)
{
  char *type = "Unknown";
  struct message *mes;

  for (mes = rtm_type_str; mes->str; mes++)
    if (mes->key == rtm->rtm_type)
      {
	type = mes->str;
	break;
      }

  zlog_info ("Kernel: Len: %d Type: %s", rtm->rtm_msglen, type);
  rtm_flag_dump (rtm->rtm_flags);
  zlog_info ("Kernel: message seq %d", rtm->rtm_seq);
  zlog_info ("Kernel: pid %d", rtm->rtm_pid);
}