Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MIP6: add IP6MU_LINK and enable debug before other options

  • Loading branch information...
commit 95ffefeb139285afcf3b880bb23d771eb13575fb 1 parent 85ef0de
k-sugyou authored

Showing 1 changed file with 25 additions and 24 deletions. Show diff stats Hide diff stats

  1. +25 24 kame/kame/mip6control/mip6control.c
49 kame/kame/mip6control/mip6control.c
... ... @@ -1,4 +1,4 @@
1   -/* $KAME: mip6control.c,v 1.28 2002/07/12 03:17:51 k-sugyou Exp $ */
  1 +/* $KAME: mip6control.c,v 1.29 2002/08/11 06:15:15 k-sugyou Exp $ */
2 2
3 3 /*
4 4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -311,6 +311,24 @@ main(argc, argv)
311 311 mip6_config.mcfg_debug ? "enable" : "disable");
312 312 }
313 313
  314 + if (debug && debugarg) {
  315 + int arg = atoi(debugarg);
  316 + int subcmd = 0;
  317 +
  318 + switch (arg) {
  319 + case 0:
  320 + subcmd = SIOCSMIP6CFG_DISABLEDEBUG;
  321 + break;
  322 + default:
  323 + subcmd = SIOCSMIP6CFG_ENABLEDEBUG;
  324 + break;
  325 + }
  326 + if(ioctl(s, SIOCSMIP6CFG, (caddr_t)&subcmd) == -1) {
  327 + perror("ioctl");
  328 + exit(1);
  329 + }
  330 + }
  331 +
314 332 if (smhparg && pfxarg) {
315 333 struct hif_ifreq *ifr;
316 334 struct mip6_prefix *mpfx;
@@ -592,24 +610,6 @@ main(argc, argv)
592 610 }
593 611 }
594 612
595   - if (debug && debugarg) {
596   - int arg = atoi(debugarg);
597   - int subcmd = 0;
598   -
599   - switch (arg) {
600   - case 0:
601   - subcmd = SIOCSMIP6CFG_DISABLEDEBUG;
602   - break;
603   - default:
604   - subcmd = SIOCSMIP6CFG_ENABLEDEBUG;
605   - break;
606   - }
607   - if(ioctl(s, SIOCSMIP6CFG, (caddr_t)&subcmd) == -1) {
608   - perror("ioctl");
609   - exit(1);
610   - }
611   - }
612   -
613 613 if (ipsec && ipsecarg) {
614 614 int arg = atoi(ipsecarg);
615 615 int subcmd = 0;
@@ -808,13 +808,14 @@ static const char *
808 808 buflg_sprintf(flags)
809 809 u_int8_t flags;
810 810 {
811   - static char buf[] = "AHSO";
  811 + static char buf[] = "AHSDL";
812 812
813   - snprintf(buf, sizeof(buf), "%s%s%s%s",
814   - (flags & IP6MU_ACK ? "A" : ""),
815   - (flags & IP6MU_HOME ? "H" : ""),
  813 + snprintf(buf, sizeof(buf), "%s%s%s%s%s",
  814 + (flags & IP6MU_ACK ? "A" : ""),
  815 + (flags & IP6MU_HOME ? "H" : ""),
816 816 (flags & IP6MU_SINGLE ? "S" : ""),
817   - (flags & IP6MU_DAD ? "D" : ""));
  817 + (flags & IP6MU_DAD ? "D" : ""),
  818 + (flags & IP6MU_LINK ? "L" : ""));
818 819
819 820 return buf;
820 821 }

0 comments on commit 95ffefe

Please sign in to comment.
Something went wrong with that request. Please try again.