summaryrefslogtreecommitdiffstats
path: root/sys/netnatm
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2003-08-06 14:34:38 +0000
committerharti <harti@FreeBSD.org>2003-08-06 14:34:38 +0000
commitc4df8bc17e600eecd5f6415645461286ff9cdc2f (patch)
treecde9e0bcf9ce8bad1f64f572c80db93f3bc8ad80 /sys/netnatm
parentc2ce7aecc7fac7b230a1d5b52d97781fa072a273 (diff)
downloadFreeBSD-src-c4df8bc17e600eecd5f6415645461286ff9cdc2f.zip
FreeBSD-src-c4df8bc17e600eecd5f6415645461286ff9cdc2f.tar.gz
Remove the last vestiges of ATM raw mode. This has not been useful for a
long time and has already been removed from the only driver that supported it (en(4)) and from the man page.
Diffstat (limited to 'sys/netnatm')
-rw-r--r--sys/netnatm/natm.c34
-rw-r--r--sys/netnatm/natm.h17
2 files changed, 6 insertions, 45 deletions
diff --git a/sys/netnatm/natm.c b/sys/netnatm/natm.c
index 05b3063..ac16555f 100644
--- a/sys/netnatm/natm.c
+++ b/sys/netnatm/natm.c
@@ -350,7 +350,6 @@ natm_usr_control(struct socket *so, u_long cmd, caddr_t arg,
struct ifnet *ifp, d_thread_t *p)
{
struct natmpcb *npcb;
- struct atm_rawioctl ario;
int error = 0;
int s = SPLSOFTNET();
@@ -360,31 +359,12 @@ natm_usr_control(struct socket *so, u_long cmd, caddr_t arg,
goto out;
}
- /*
- * raw atm ioctl. comes in as a SIOCRAWATM. we convert it to
- * SIOCXRAWATM and pass it to the driver.
- */
- if (cmd == SIOCRAWATM) {
- if (npcb->npcb_ifp == NULL) {
- error = ENOTCONN;
- goto out;
- }
- ario.npcb = npcb;
- ario.rawvalue = *((int *)arg);
- error = npcb->npcb_ifp->if_ioctl(npcb->npcb_ifp,
- SIOCXRAWATM, (caddr_t) &ario);
- if (!error) {
- if (ario.rawvalue)
- npcb->npcb_flags |= NPCB_RAW;
- else
- npcb->npcb_flags &= ~(NPCB_RAW);
- }
- } else {
- splx(s);
- if (ifp == NULL || ifp->if_ioctl == NULL)
- return (EOPNOTSUPP);
- return ((*ifp->if_ioctl)(ifp, cmd, arg));
+ splx(s);
+ if (ifp == NULL || ifp->if_ioctl == NULL) {
+ error = EOPNOTSUPP;
+ goto out;
}
+ return ((*ifp->if_ioctl)(ifp, cmd, arg));
out:
splx(s);
@@ -736,9 +716,7 @@ natmintr(struct mbuf *m)
#endif
#endif
- if (sbspace(&so->so_rcv) > m->m_pkthdr.len ||
- ((npcb->npcb_flags & NPCB_RAW) != 0 &&
- so->so_rcv.sb_cc < NPCB_RAWCC)) {
+ if (sbspace(&so->so_rcv) > m->m_pkthdr.len) {
#ifdef NATM_STAT
natm_sookcnt++;
natm_sookbytes += m->m_pkthdr.len;
diff --git a/sys/netnatm/natm.h b/sys/netnatm/natm.h
index d0469df..9cc925d 100644
--- a/sys/netnatm/natm.h
+++ b/sys/netnatm/natm.h
@@ -86,21 +86,11 @@ struct natmpcb {
#define NPCB_CONNECTED 0x02 /* connected */
#define NPCB_IP 0x04 /* used by IP */
#define NPCB_DRAIN 0x08 /* destory as soon as inq == 0 */
-#define NPCB_RAW 0x10 /* in 'raw' mode? */
/* flag arg to npcb_free */
#define NPCB_REMOVE 0 /* remove from global list */
#define NPCB_DESTROY 1 /* destroy and be free */
-/*
- * NPCB_RAWCC is a hack which applies to connections in 'raw' mode. it
- * is used to override the sbspace() macro when you *really* don't want
- * to drop rcv data. the recv socket buffer size is raised to this value.
- *
- * XXX: socket buffering needs to be looked at.
- */
-#define NPCB_RAWCC (1024*1024) /* 1MB */
-
LIST_HEAD(npcblist, natmpcb);
/* global data structures */
@@ -114,13 +104,6 @@ extern u_int natm_sookcnt;
extern u_int natm_sookbytes; /* account of ok */
#endif
-/* atm_rawioctl: kernel's version of SIOCRAWATM [for internal use only!] */
-struct atm_rawioctl {
- struct natmpcb *npcb;
- int rawvalue;
-};
-#define SIOCXRAWATM _IOWR('a', 125, struct atm_rawioctl)
-
/* external functions */
/* natm_pcb.c */
OpenPOWER on IntegriCloud