1/*- 2 * Copyright (c) 2006 Max Laier. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 11 unchanged lines hidden (view full) --- 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 */ 25 26#ifndef lint 27static const char rcsid[] = |
28 "$FreeBSD: head/sbin/ifconfig/ifgroup.c 288305 2015-09-27 07:51:18Z ngie $"; |
29#endif /* not lint */ 30 |
31#include <sys/param.h> |
32#include <sys/ioctl.h> 33#include <sys/socket.h> 34#include <net/if.h> 35 36#include <ctype.h> 37#include <err.h> 38#include <errno.h> 39#include <stdio.h> --- 129 unchanged lines hidden (view full) --- 169 .af_af = AF_UNSPEC, 170 .af_other_status = getifgroups, 171}; 172static struct option group_gopt = { "g:", "[-g groupname]", printgroup }; 173 174static __constructor void 175group_ctor(void) 176{ |
177 int i; 178 |
179 for (i = 0; i < nitems(group_cmds); i++) |
180 cmd_register(&group_cmds[i]); 181 af_register(&af_group); 182 opt_register(&group_gopt); |
183} |