Deleted Added
full compact
bundle.c (74165) bundle.c (74916)
1/*-
2 * Copyright (c) 1998 Brian Somers <brian@Awfulhak.org>
3 * 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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1998 Brian Somers <brian@Awfulhak.org>
3 * 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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/usr.sbin/ppp/bundle.c 74165 2001-03-12 12:53:53Z brian $
26 * $FreeBSD: head/usr.sbin/ppp/bundle.c 74916 2001-03-28 09:45:27Z brian $
27 */
28
29#include <sys/param.h>
30#include <sys/socket.h>
31#include <netinet/in.h>
32#include <net/if.h>
33#include <net/if_tun.h> /* For TUNS* ioctls */
34#include <arpa/inet.h>

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

786 * If TUNSIFHEAD isn't available and we're not OpenBSD, assume
787 * everything's AF_INET (hopefully the tun device won't pass us
788 * anything else !).
789 */
790 bundle.dev.header = 0;
791#endif
792#endif
793
27 */
28
29#include <sys/param.h>
30#include <sys/socket.h>
31#include <netinet/in.h>
32#include <net/if.h>
33#include <net/if_tun.h> /* For TUNS* ioctls */
34#include <arpa/inet.h>

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

786 * If TUNSIFHEAD isn't available and we're not OpenBSD, assume
787 * everything's AF_INET (hopefully the tun device won't pass us
788 * anything else !).
789 */
790 bundle.dev.header = 0;
791#endif
792#endif
793
794 if (!iface_SetFlags(bundle.iface, IFF_UP)) {
794 if (!iface_SetFlags(bundle.iface->name, IFF_UP)) {
795 iface_Destroy(bundle.iface);
796 bundle.iface = NULL;
797 close(bundle.dev.fd);
798 return NULL;
799 }
800
801 log_Printf(LogPHASE, "Using interface: %s\n", ifname);
802

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

881
882 return &bundle;
883}
884
885static void
886bundle_DownInterface(struct bundle *bundle)
887{
888 route_IfDelete(bundle, 1);
795 iface_Destroy(bundle.iface);
796 bundle.iface = NULL;
797 close(bundle.dev.fd);
798 return NULL;
799 }
800
801 log_Printf(LogPHASE, "Using interface: %s\n", ifname);
802

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

881
882 return &bundle;
883}
884
885static void
886bundle_DownInterface(struct bundle *bundle)
887{
888 route_IfDelete(bundle, 1);
889 iface_ClearFlags(bundle->iface, IFF_UP);
889 iface_ClearFlags(bundle->iface->name, IFF_UP);
890}
891
892void
893bundle_Destroy(struct bundle *bundle)
894{
895 struct datalink *dl;
896
897 /*

--- 1158 unchanged lines hidden ---
890}
891
892void
893bundle_Destroy(struct bundle *bundle)
894{
895 struct datalink *dl;
896
897 /*

--- 1158 unchanged lines hidden ---