Deleted Added
full compact
mkpeer.c (158882) mkpeer.c (160002)
1
2/*
3 * mkpeer.c
4 *
5 * Copyright (c) 1996-1999 Whistle Communications, Inc.
6 * All rights reserved.
7 *
8 * Subject to the following obligations and disclaimer of warranty, use and

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

29 * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
30 * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
35 * OF SUCH DAMAGE.
36 *
1
2/*
3 * mkpeer.c
4 *
5 * Copyright (c) 1996-1999 Whistle Communications, Inc.
6 * All rights reserved.
7 *
8 * Subject to the following obligations and disclaimer of warranty, use and

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

29 * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
30 * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
35 * OF SUCH DAMAGE.
36 *
37 * $FreeBSD: head/usr.sbin/ngctl/mkpeer.c 158882 2006-05-24 14:46:55Z glebius $
37 * $FreeBSD: head/usr.sbin/ngctl/mkpeer.c 160002 2006-06-28 10:38:38Z glebius $
38 */
39
40#include <err.h>
41#include <netgraph.h>
42#include <stdio.h>
43
44#include "ngctl.h"
45

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

71 av++;
72 /* FALLTHROUGH */
73 case 4:
74 snprintf(mkp.type, sizeof(mkp.type), "%s", av[1]);
75 snprintf(mkp.ourhook, sizeof(mkp.ourhook), "%s", av[2]);
76 snprintf(mkp.peerhook, sizeof(mkp.peerhook), "%s", av[3]);
77 break;
78 default:
38 */
39
40#include <err.h>
41#include <netgraph.h>
42#include <stdio.h>
43
44#include "ngctl.h"
45

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

71 av++;
72 /* FALLTHROUGH */
73 case 4:
74 snprintf(mkp.type, sizeof(mkp.type), "%s", av[1]);
75 snprintf(mkp.ourhook, sizeof(mkp.ourhook), "%s", av[2]);
76 snprintf(mkp.peerhook, sizeof(mkp.peerhook), "%s", av[3]);
77 break;
78 default:
79 return(CMDRTN_USAGE);
79 return (CMDRTN_USAGE);
80 }
81
82 /* Send message */
83 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE,
84 NGM_MKPEER, &mkp, sizeof(mkp)) < 0) {
85 warn("send msg");
80 }
81
82 /* Send message */
83 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE,
84 NGM_MKPEER, &mkp, sizeof(mkp)) < 0) {
85 warn("send msg");
86 return(CMDRTN_ERROR);
86 return (CMDRTN_ERROR);
87 }
87 }
88 return(CMDRTN_OK);
88 return (CMDRTN_OK);
89}
90
89}
90