Changeset 32782


Ignore:
Timestamp:
2012-07-19T21:51:53+02:00 (6 years ago)
Author:
jow
Message:

[package] owipcalc: add "prefix" operation to set prefix of base address during calculation

Location:
trunk/package/owipcalc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/owipcalc/Makefile

    r32778 r32782  
    88 
    99PKG_NAME:=owipcalc 
    10 PKG_RELEASE:=1 
     10PKG_RELEASE:=2 
    1111 
    1212include $(INCLUDE_DIR)/package.mk 
  • trunk/package/owipcalc/src/owipcalc.c

    r32778 r32782  
    519519} 
    520520 
     521static bool cidr_prefix(struct cidr *a, struct cidr *b) 
     522{ 
     523        a->prefix = b->prefix; 
     524        return true; 
     525} 
     526 
    521527static bool cidr_quiet(struct cidr *a) 
    522528{ 
     
    545551          .desc = "Turn base address into broadcast address", 
    546552          .f4.a1 = cidr_broadcast4 }, 
     553 
     554        { .name = "prefix", 
     555          .desc = "Set the prefix of base address to argument", 
     556          .f4.a2 = cidr_prefix, 
     557          .f6.a2 = cidr_prefix }, 
    547558 
    548559        { .name = "netmask", 
Note: See TracChangeset for help on using the changeset viewer.