~ubuntu-branches/ubuntu/saucy/quagga/saucy

« back to all changes in this revision

Viewing changes to lib/command.c

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-05-17 11:37:31 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070517113731-tpukbvebcipvbfsw
Tags: 0.99.7-2ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/rules: use bash as shell
  - debian/quagga.prerm: handle upgrades more gracefully
  - debian/patches/81_32bit_u64.dpatch: Define __u64 as uint64_t
    before including the netlink headers, since that symbol does not exist
    by default on 32 bit arches. Fixes i386/powerpc FTBFS.
  - debian/patches/83_ifaddr_defs.dpatch:
    zebra/rt_netlink.c: #include <linux/if_addr.h> and define IF[L]A_RTA
    macros, so that the file compiles again with our kernel headers.
  - debian/patches/20_ht-20061217-0.99.6-bgp-md5.dpatch: updated for
    linux kernel 2.6.20.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
   $Id: command.c,v 1.54 2006/06/15 12:25:55 paul Exp $
 
2
   $Id: command.c,v 1.55 2007/04/28 22:14:10 ajs Exp $
3
3
 
4
4
   Command interpreter routine for virtual terminal [aka TeletYpe]
5
5
   Copyright (C) 1997, 98, 99 Kunihiro Ishiguro
594
594
  if (zlog_default->record_priority == 1)
595
595
    vty_out (vty, "log record-priority%s", VTY_NEWLINE);
596
596
 
 
597
  if (zlog_default->timestamp_precision > 0)
 
598
    vty_out (vty, "log timestamp precision %d%s",
 
599
             zlog_default->timestamp_precision, VTY_NEWLINE);
 
600
 
597
601
  if (host.advanced)
598
602
    vty_out (vty, "service advanced-vty%s", VTY_NEWLINE);
599
603
 
3092
3096
           zlog_proto_names[zl->protocol], VTY_NEWLINE);
3093
3097
  vty_out (vty, "Record priority: %s%s",
3094
3098
           (zl->record_priority ? "enabled" : "disabled"), VTY_NEWLINE);
 
3099
  vty_out (vty, "Timestamp precision: %d%s",
 
3100
           zl->timestamp_precision, VTY_NEWLINE);
3095
3101
 
3096
3102
  return CMD_SUCCESS;
3097
3103
}
3416
3422
  return CMD_SUCCESS;
3417
3423
}
3418
3424
 
 
3425
DEFUN (config_log_timestamp_precision,
 
3426
       config_log_timestamp_precision_cmd,
 
3427
       "log timestamp precision <0-6>",
 
3428
       "Logging control\n"
 
3429
       "Timestamp configuration\n"
 
3430
       "Set the timestamp precision\n"
 
3431
       "Number of subsecond digits\n")
 
3432
{
 
3433
  if (argc != 1)
 
3434
    {
 
3435
      vty_out (vty, "Insufficient arguments%s", VTY_NEWLINE);
 
3436
      return CMD_WARNING;
 
3437
    }
 
3438
 
 
3439
  VTY_GET_INTEGER_RANGE("Timestamp Precision",
 
3440
                        zlog_default->timestamp_precision, argv[0], 0, 6);
 
3441
  return CMD_SUCCESS;
 
3442
}
 
3443
 
 
3444
DEFUN (no_config_log_timestamp_precision,
 
3445
       no_config_log_timestamp_precision_cmd,
 
3446
       "no log timestamp precision",
 
3447
       NO_STR
 
3448
       "Logging control\n"
 
3449
       "Timestamp configuration\n"
 
3450
       "Reset the timestamp precision to the default value of 0\n")
 
3451
{
 
3452
  zlog_default->timestamp_precision = 0 ;
 
3453
  return CMD_SUCCESS;
 
3454
}
 
3455
 
3419
3456
DEFUN (banner_motd_file,
3420
3457
       banner_motd_file_cmd,
3421
3458
       "banner motd file [FILE]",
3571
3608
      install_element (CONFIG_NODE, &no_config_log_trap_cmd);
3572
3609
      install_element (CONFIG_NODE, &config_log_record_priority_cmd);
3573
3610
      install_element (CONFIG_NODE, &no_config_log_record_priority_cmd);
 
3611
      install_element (CONFIG_NODE, &config_log_timestamp_precision_cmd);
 
3612
      install_element (CONFIG_NODE, &no_config_log_timestamp_precision_cmd);
3574
3613
      install_element (CONFIG_NODE, &service_password_encrypt_cmd);
3575
3614
      install_element (CONFIG_NODE, &no_service_password_encrypt_cmd);
3576
3615
      install_element (CONFIG_NODE, &banner_motd_default_cmd);