Deleted Added
full compact
if_spppsubr.c (6429) if_spppsubr.c (8456)
1/*
2 * Synchronous PPP/Cisco link level subroutines.
3 * Keepalive protocol implemented in both Cisco and PPP modes.
4 *
5 * Copyright (C) 1994 Cronyx Ltd.
6 * Author: Serge Vakulenko, <vak@zebub.msk.su>
7 *
8 * This software is distributed with NO WARRANTIES, not even the implied

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

736 if (m->m_pkthdr.len != CISCO_PACKET_LEN) {
737 if (ifp->if_flags & IFF_DEBUG)
738 printf ("%s%d: invalid cisco packet length: %d bytes\n",
739 ifp->if_name, ifp->if_unit, m->m_pkthdr.len);
740 return;
741 }
742 h = mtod (m, struct cisco_packet*);
743 if (ifp->if_flags & IFF_DEBUG)
1/*
2 * Synchronous PPP/Cisco link level subroutines.
3 * Keepalive protocol implemented in both Cisco and PPP modes.
4 *
5 * Copyright (C) 1994 Cronyx Ltd.
6 * Author: Serge Vakulenko, <vak@zebub.msk.su>
7 *
8 * This software is distributed with NO WARRANTIES, not even the implied

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

736 if (m->m_pkthdr.len != CISCO_PACKET_LEN) {
737 if (ifp->if_flags & IFF_DEBUG)
738 printf ("%s%d: invalid cisco packet length: %d bytes\n",
739 ifp->if_name, ifp->if_unit, m->m_pkthdr.len);
740 return;
741 }
742 h = mtod (m, struct cisco_packet*);
743 if (ifp->if_flags & IFF_DEBUG)
744 printf ("%s%d: cisco input: %d bytes <%xh %xh %xh %xh %xh-%xh>\n",
744 printf ("%s%d: cisco input: %d bytes "
745 "<%lxh %lxh %lxh %xh %xh-%xh>\n",
745 ifp->if_name, ifp->if_unit, m->m_pkthdr.len,
746 ntohl (h->type), h->par1, h->par2, h->rel,
747 h->time0, h->time1);
748 switch (ntohl (h->type)) {
749 default:
750 if (ifp->if_flags & IFF_DEBUG)
746 ifp->if_name, ifp->if_unit, m->m_pkthdr.len,
747 ntohl (h->type), h->par1, h->par2, h->rel,
748 h->time0, h->time1);
749 switch (ntohl (h->type)) {
750 default:
751 if (ifp->if_flags & IFF_DEBUG)
751 printf ("%s%d: unknown cisco packet type: 0x%x\n",
752 printf ("%s%d: unknown cisco packet type: 0x%lx\n",
752 ifp->if_name, ifp->if_unit, ntohl (h->type));
753 break;
754 case CISCO_ADDR_REPLY:
755 /* Reply on address request, ignore */
756 break;
757 case CISCO_KEEPALIVE_REQ:
758 if (! (ifp->if_flags & IFF_UP) &&
759 (ifp->if_flags & IFF_RUNNING)) {

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

867 ch->type = htonl (type);
868 ch->par1 = htonl (par1);
869 ch->par2 = htonl (par2);
870 ch->rel = -1;
871 ch->time0 = htons ((unsigned short) (t >> 16));
872 ch->time1 = htons ((unsigned short) t);
873
874 if (ifp->if_flags & IFF_DEBUG)
753 ifp->if_name, ifp->if_unit, ntohl (h->type));
754 break;
755 case CISCO_ADDR_REPLY:
756 /* Reply on address request, ignore */
757 break;
758 case CISCO_KEEPALIVE_REQ:
759 if (! (ifp->if_flags & IFF_UP) &&
760 (ifp->if_flags & IFF_RUNNING)) {

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

868 ch->type = htonl (type);
869 ch->par1 = htonl (par1);
870 ch->par2 = htonl (par2);
871 ch->rel = -1;
872 ch->time0 = htons ((unsigned short) (t >> 16));
873 ch->time1 = htons ((unsigned short) t);
874
875 if (ifp->if_flags & IFF_DEBUG)
875 printf ("%s%d: cisco output: <%xh %xh %xh %xh %xh-%xh>\n",
876 printf ("%s%d: cisco output: <%lxh %lxh %lxh %xh %xh-%xh>\n",
876 ifp->if_name, ifp->if_unit, ntohl (ch->type), ch->par1,
877 ch->par2, ch->rel, ch->time0, ch->time1);
878
879 if (IF_QFULL (&sp->pp_fastq)) {
880 IF_DROP (&ifp->if_snd);
881 m_freem (m);
882 } else
883 IF_ENQUEUE (&sp->pp_fastq, m);

--- 337 unchanged lines hidden ---
877 ifp->if_name, ifp->if_unit, ntohl (ch->type), ch->par1,
878 ch->par2, ch->rel, ch->time0, ch->time1);
879
880 if (IF_QFULL (&sp->pp_fastq)) {
881 IF_DROP (&ifp->if_snd);
882 m_freem (m);
883 } else
884 IF_ENQUEUE (&sp->pp_fastq, m);

--- 337 unchanged lines hidden ---