ifgroup.c (159781) | ifgroup.c (166804) |
---|---|
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[] = | 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 159781 2006-06-19 22:20:45Z mlaier $"; | 28 "$FreeBSD: head/sbin/ifconfig/ifgroup.c 166804 2007-02-17 18:22:20Z sam $"; |
29#endif /* not lint */ 30 31#include <sys/types.h> 32#include <sys/ioctl.h> 33#include <sys/socket.h> 34#include <net/if.h> 35 36#include <ctype.h> --- 82 unchanged lines hidden (view full) --- 119 printf("%s ", ifg->ifgrq_group); 120 } 121 } 122 if (cnt) 123 printf("\n"); 124} 125 126static void | 29#endif /* not lint */ 30 31#include <sys/types.h> 32#include <sys/ioctl.h> 33#include <sys/socket.h> 34#include <net/if.h> 35 36#include <ctype.h> --- 82 unchanged lines hidden (view full) --- 119 printf("%s ", ifg->ifgrq_group); 120 } 121 } 122 if (cnt) 123 printf("\n"); 124} 125 126static void |
127printgroup(char *groupname) | 127printgroup(const char *groupname) |
128{ 129 struct ifgroupreq ifgr; 130 struct ifg_req *ifg; 131 int len, cnt = 0; 132 int s; 133 134 s = socket(AF_INET, SOCK_DGRAM, 0); 135 if (s == -1) --- 51 unchanged lines hidden --- | 128{ 129 struct ifgroupreq ifgr; 130 struct ifg_req *ifg; 131 int len, cnt = 0; 132 int s; 133 134 s = socket(AF_INET, SOCK_DGRAM, 0); 135 if (s == -1) --- 51 unchanged lines hidden --- |