You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by Brian Behlendorf <br...@hyperreal.com> on 1997/01/22 19:22:39 UTC
cvs commit: apache/htdocs/manual/misc vif-info.html
brian 97/01/22 10:22:39
Modified: htdocs/manual/misc vif-info.html
Log:
HTML-escaped the code, otherwise < and > were interpreted as tag demarkers - eek.
Revision Changes Path
1.3 +26 -26 apache/htdocs/manual/misc/vif-info.html
Index: vif-info.html
===================================================================
RCS file: /export/home/cvs/apache/htdocs/manual/misc/vif-info.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -C3 -r1.2 -r1.3
*** vif-info.html 1996/12/05 05:48:20 1.2
--- vif-info.html 1997/01/22 18:22:37 1.3
***************
*** 99,105 ****
--------------------
#include "vif.h"
! #if NVIF > 0
int vifopen(), vifclose(), vifread(), vifwrite(), vifselect(), vifioctl();
#else
#define vifopen nodev
--- 99,105 ----
--------------------
#include "vif.h"
! #if NVIF > 0
int vifopen(), vifclose(), vifread(), vifwrite(), vifselect(), vifioctl();
#else
#define vifopen nodev
***************
*** 187,201 ****
register struct ifnet *ifp;
int vifoutput(), vififioctl();
! for (i=0; i<NVIF; i++)
{
ifp = &vif_softc[i].vif_if;
! ifp->if_name = "vif";
! ifp->if_unit = i;
! ifp->if_mtu = VIFMTU;
! ifp->if_flags = IFF_LOOPBACK | IFF_NOARP;
! ifp->if_ioctl = vififioctl;
! ifp->if_output = vifoutput;
if_attach(ifp);
}
}
--- 187,201 ----
register struct ifnet *ifp;
int vifoutput(), vififioctl();
! for (i=0; i<NVIF; i++)
{
ifp = &vif_softc[i].vif_if;
! ifp->if_name = "vif";
! ifp->if_unit = i;
! ifp->if_mtu = VIFMTU;
! ifp->if_flags = IFF_LOOPBACK | IFF_NOARP;
! ifp->if_ioctl = vififioctl;
! ifp->if_output = vifoutput;
if_attach(ifp);
}
}
***************
*** 213,219 ****
}
unit = minor(dev);
! if ((unit < 0) || (unit >= NVIF))
{
return ENXIO;
}
--- 213,219 ----
}
unit = minor(dev);
! if ((unit < 0) || (unit >= NVIF))
{
return ENXIO;
}
***************
*** 252,292 ****
struct mbuf *m;
struct sockaddr_in *din;
! if (dst->sa_family != AF_INET)
{
printf("%s%d: can't handle af%d\n",
! ifp->if_name, ifp->if_unit,
! dst->sa_family);
m_freem(m0);
return (EAFNOSUPPORT);
}
din = (struct sockaddr_in *)dst;
! if (din->sin_addr.s_addr == IA_SIN(ifp->if_addrlist)->sin_addr.s_addr)
{
! /* printf("%s%d: looping\n", ifp->if_name, ifp->if_unit); */
/*
* Place interface pointer before the data
* for the receiving protocol.
*/
! if (m0->m_off <= MMAXOFF &&
! m0->m_off >= MMINOFF + sizeof(struct ifnet *)) {
! m0->m_off -= sizeof(struct ifnet *);
! m0->m_len += sizeof(struct ifnet *);
} else {
MGET(m, M_DONTWAIT, MT_HEADER);
if (m == (struct mbuf *)0)
return (ENOBUFS);
! m->m_off = MMINOFF;
! m->m_len = sizeof(struct ifnet *);
! m->m_next = m0;
m0 = m;
}
*(mtod(m0, struct ifnet **)) = ifp;
s = splimp();
! ifp->if_opackets++;
ifq = &ipintrq;
if (IF_QFULL(ifq)) {
IF_DROP(ifq);
--- 252,292 ----
struct mbuf *m;
struct sockaddr_in *din;
! if (dst->sa_family != AF_INET)
{
printf("%s%d: can't handle af%d\n",
! ifp->if_name, ifp->if_unit,
! dst->sa_family);
m_freem(m0);
return (EAFNOSUPPORT);
}
din = (struct sockaddr_in *)dst;
! if (din->sin_addr.s_addr == IA_SIN(ifp->if_addrlist)->sin_addr.s_addr)
{
! /* printf("%s%d: looping\n", ifp->if_name, ifp->if_unit); */
/*
* Place interface pointer before the data
* for the receiving protocol.
*/
! if (m0->m_off <= MMAXOFF &&
! m0->m_off >= MMINOFF + sizeof(struct ifnet *)) {
! m0->m_off -= sizeof(struct ifnet *);
! m0->m_len += sizeof(struct ifnet *);
} else {
MGET(m, M_DONTWAIT, MT_HEADER);
if (m == (struct mbuf *)0)
return (ENOBUFS);
! m->m_off = MMINOFF;
! m->m_len = sizeof(struct ifnet *);
! m->m_next = m0;
m0 = m;
}
*(mtod(m0, struct ifnet **)) = ifp;
s = splimp();
! ifp->if_opackets++;
ifq = &ipintrq;
if (IF_QFULL(ifq)) {
IF_DROP(ifq);
***************
*** 296,302 ****
}
IF_ENQUEUE(ifq, m0);
schednetisr(NETISR_IP);
! ifp->if_ipackets++;
splx(s);
return (0);
}
--- 296,302 ----
}
IF_ENQUEUE(ifq, m0);
schednetisr(NETISR_IP);
! ifp->if_ipackets++;
splx(s);
return (0);
}
***************
*** 318,324 ****
switch (cmd) {
case SIOCSIFADDR:
! ifp->if_flags |= IFF_UP;
/*
* Everything else is done at a higher level.
*/
--- 318,324 ----
switch (cmd) {
case SIOCSIFADDR:
! ifp->if_flags |= IFF_UP;
/*
* Everything else is done at a higher level.
*/
***************
*** 339,345 ****
int unit;
unit = minor(dev);
! if ((unit < 0) || (unit >= NVIF))
return ENXIO;
return EINVAL;
--- 339,345 ----
int unit;
unit = minor(dev);
! if ((unit < 0) || (unit >= NVIF))
return ENXIO;
return EINVAL;
***************
*** 354,360 ****
(or whatever major number it ended up being), and echo something into
it:
! # echo > /dev/vif
This will cause the device to be opened, which will if_attach the
interfaces. If you feel like playing with the code, you may want to
--- 354,360 ----
(or whatever major number it ended up being), and echo something into
it:
! # echo > /dev/vif
This will cause the device to be opened, which will if_attach the
interfaces. If you feel like playing with the code, you may want to
Re: cvs commit: apache/htdocs/manual/misc vif-info.html
Posted by Brian Behlendorf <br...@organic.com>.
On Wed, 22 Jan 1997, Brian Behlendorf wrote:
> <<< No Message Collected >>>
Hmm, not sure why no message was sent - the message should have read something
along the lines of "HTML-escaped various < and > characters in the C code to
make them not cause browsers to think they are beginnings and endings of tags".
Brian
--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com www.apache.org hyperreal.com http://www.organic.com/JOBS