Deleted Added
full compact
arp.c (186485) arp.c (186500)
1/*
2 * Copyright (c) 1984, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Sun Microsystems, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41static char const sccsid[] = "@(#)from: arp.c 8.2 (Berkeley) 1/2/94";
42#endif /* not lint */
43#endif
44#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1984, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Sun Microsystems, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41static char const sccsid[] = "@(#)from: arp.c 8.2 (Berkeley) 1/2/94";
42#endif /* not lint */
43#endif
44#include <sys/cdefs.h>
45__FBSDID("$FreeBSD: head/usr.sbin/arp/arp.c 186485 2008-12-25 06:44:19Z trhodes $");
45__FBSDID("$FreeBSD: head/usr.sbin/arp/arp.c 186500 2008-12-26 19:45:24Z qingli $");
46
47/*
48 * arp - display, set, and delete arp table entries
49 */
50
51
52#include <sys/param.h>
53#include <sys/file.h>

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

472 }
473
474 if (dst->sin_other & SIN_PROXY) {
475 fprintf(stderr, "delete: cannot locate %s\n",host);
476 return (1);
477 }
478 dst->sin_other = SIN_PROXY;
479 }
46
47/*
48 * arp - display, set, and delete arp table entries
49 */
50
51
52#include <sys/param.h>
53#include <sys/file.h>

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

472 }
473
474 if (dst->sin_other & SIN_PROXY) {
475 fprintf(stderr, "delete: cannot locate %s\n",host);
476 return (1);
477 }
478 dst->sin_other = SIN_PROXY;
479 }
480 rtm->rtm_flags |= RTF_LLDATA;
480 if (rtmsg(RTM_DELETE, dst, NULL) != NULL) {
481 printf("%s (%s) deleted\n", host, inet_ntoa(addr->sin_addr));
482 return (0);
483 }
484 return (1);
485}
486
487/*

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

701
702 switch (cmd) {
703 default:
704 errx(1, "internal wrong cmd");
705 case RTM_ADD:
706 rtm->rtm_addrs |= RTA_GATEWAY;
707 rtm->rtm_rmx.rmx_expire = expire_time;
708 rtm->rtm_inits = RTV_EXPIRE;
481 if (rtmsg(RTM_DELETE, dst, NULL) != NULL) {
482 printf("%s (%s) deleted\n", host, inet_ntoa(addr->sin_addr));
483 return (0);
484 }
485 return (1);
486}
487
488/*

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

702
703 switch (cmd) {
704 default:
705 errx(1, "internal wrong cmd");
706 case RTM_ADD:
707 rtm->rtm_addrs |= RTA_GATEWAY;
708 rtm->rtm_rmx.rmx_expire = expire_time;
709 rtm->rtm_inits = RTV_EXPIRE;
709 rtm->rtm_flags |= (RTF_HOST | RTF_STATIC);
710 rtm->rtm_flags |= (RTF_HOST | RTF_STATIC | RTF_LLDATA);
710 dst->sin_other = 0;
711 if (doing_proxy) {
712 if (proxy_only)
713 dst->sin_other = SIN_PROXY;
714 else {
715 rtm->rtm_addrs |= RTA_NETMASK;
716 rtm->rtm_flags &= ~RTF_HOST;
717 }

--- 128 unchanged lines hidden ---
711 dst->sin_other = 0;
712 if (doing_proxy) {
713 if (proxy_only)
714 dst->sin_other = SIN_PROXY;
715 else {
716 rtm->rtm_addrs |= RTA_NETMASK;
717 rtm->rtm_flags &= ~RTF_HOST;
718 }

--- 128 unchanged lines hidden ---