Deleted Added
full compact
ifclone.c (295836) ifclone.c (299873)
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. 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

--- 15 unchanged lines hidden (view full) ---

24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#ifndef lint
31static const char rcsid[] =
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. 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

--- 15 unchanged lines hidden (view full) ---

24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#ifndef lint
31static const char rcsid[] =
32 "$FreeBSD: head/sbin/ifconfig/ifclone.c 295836 2016-02-20 11:36:35Z kp $";
32 "$FreeBSD: head/sbin/ifconfig/ifclone.c 299873 2016-05-16 00:25:24Z truckman $";
33#endif /* not lint */
34
35#include <sys/param.h>
36#include <sys/ioctl.h>
37#include <sys/queue.h>
38#include <sys/socket.h>
39#include <net/if.h>
40

--- 116 unchanged lines hidden (view full) ---

157DECL_CMD_FUNC(clone_create, arg, d)
158{
159 callback_register(ifclonecreate, NULL);
160}
161
162static
163DECL_CMD_FUNC(clone_destroy, arg, d)
164{
33#endif /* not lint */
34
35#include <sys/param.h>
36#include <sys/ioctl.h>
37#include <sys/queue.h>
38#include <sys/socket.h>
39#include <net/if.h>
40

--- 116 unchanged lines hidden (view full) ---

157DECL_CMD_FUNC(clone_create, arg, d)
158{
159 callback_register(ifclonecreate, NULL);
160}
161
162static
163DECL_CMD_FUNC(clone_destroy, arg, d)
164{
165 (void) strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
165 (void) strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
166 if (ioctl(s, SIOCIFDESTROY, &ifr) < 0)
167 err(1, "SIOCIFDESTROY");
168}
169
170static struct cmd clone_cmds[] = {
171 DEF_CLONE_CMD("create", 0, clone_create),
172 DEF_CMD("destroy", 0, clone_destroy),
173 DEF_CLONE_CMD("plumb", 0, clone_create),

--- 20 unchanged lines hidden ---
166 if (ioctl(s, SIOCIFDESTROY, &ifr) < 0)
167 err(1, "SIOCIFDESTROY");
168}
169
170static struct cmd clone_cmds[] = {
171 DEF_CLONE_CMD("create", 0, clone_create),
172 DEF_CMD("destroy", 0, clone_destroy),
173 DEF_CLONE_CMD("plumb", 0, clone_create),

--- 20 unchanged lines hidden ---