ifvlan.c (db82353d8728ca73ebfda235ec4be5b9554d93d2) | ifvlan.c (2fa02c5fb7eb94da42978aaae1ffed8decf7e8a2) |
---|---|
1/* 2 * Copyright (c) 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 158 unchanged lines hidden (view full) --- 167 bzero((char *)&vreq.vlr_parent, sizeof(vreq.vlr_parent)); 168 vreq.vlr_tag = 0; 169 170 if (ioctl(s, SIOCSETVLAN, (caddr_t)&ifr) == -1) 171 err(1, "SIOCSETVLAN"); 172} 173 174static struct cmd vlan_cmds[] = { | 1/* 2 * Copyright (c) 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 158 unchanged lines hidden (view full) --- 167 bzero((char *)&vreq.vlr_parent, sizeof(vreq.vlr_parent)); 168 vreq.vlr_tag = 0; 169 170 if (ioctl(s, SIOCSETVLAN, (caddr_t)&ifr) == -1) 171 err(1, "SIOCSETVLAN"); 172} 173 174static struct cmd vlan_cmds[] = { |
175 DEF_CMD_ARG("vlan", setvlantag), 176 DEF_CMD_ARG("vlandev", setvlandev), | 175 DEF_CLONE_CMD_ARG("vlan", setvlantag), 176 DEF_CLONE_CMD_ARG("vlandev", setvlandev), |
177 /* XXX For compatibility. Should become DEF_CMD() some day. */ 178 DEF_CMD_OPTARG("-vlandev", unsetvlandev), 179 DEF_CMD("vlanmtu", IFCAP_VLAN_MTU, setifcap), 180 DEF_CMD("-vlanmtu", -IFCAP_VLAN_MTU, setifcap), 181 DEF_CMD("vlanhwtag", IFCAP_VLAN_HWTAGGING, setifcap), 182 DEF_CMD("-vlanhwtag", -IFCAP_VLAN_HWTAGGING, setifcap), 183}; 184static struct afswtch af_vlan = { --- 17 unchanged lines hidden --- | 177 /* XXX For compatibility. Should become DEF_CMD() some day. */ 178 DEF_CMD_OPTARG("-vlandev", unsetvlandev), 179 DEF_CMD("vlanmtu", IFCAP_VLAN_MTU, setifcap), 180 DEF_CMD("-vlanmtu", -IFCAP_VLAN_MTU, setifcap), 181 DEF_CMD("vlanhwtag", IFCAP_VLAN_HWTAGGING, setifcap), 182 DEF_CMD("-vlanhwtag", -IFCAP_VLAN_HWTAGGING, setifcap), 183}; 184static struct afswtch af_vlan = { --- 17 unchanged lines hidden --- |