* SUCH DAMAGE.
*
* from: @(#)uipc_usrreq.c 7.26 (Berkeley) 6/3/91
- * $Id: uipc_usrreq.c,v 1.3 1993/09/14 04:26:40 rgrimes Exp $
+ * $Id: uipc_usrreq.c,v 1.4 1993/10/23 16:34:45 davidg Exp $
*/
#include "param.h"
+#include "systm.h"
#include "proc.h"
#include "filedesc.h"
#include "domain.h"
ino_t unp_ino; /* prototype for fake inode numbers */
/*ARGSUSED*/
+int
uipc_usrreq(so, req, m, nam, control)
struct socket *so;
int req;
int unp_rights; /* file descriptors in flight */
+int
unp_attach(so)
struct socket *so;
{
case SOCK_DGRAM:
error = soreserve(so, unpdg_sendspace, unpdg_recvspace);
break;
+ default:
+ panic("unp_attach");
}
if (error)
return (error);
return (0);
}
+void
unp_detach(unp)
register struct unpcb *unp;
{
}
}
+int
unp_bind(unp, nam, p)
struct unpcb *unp;
struct mbuf *nam;
return (0);
}
+int
unp_connect(so, nam, p)
struct socket *so;
struct mbuf *nam;
return (error);
}
+int
unp_connect2(so, so2)
register struct socket *so;
register struct socket *so2;
return (0);
}
+void
unp_disconnect(unp)
struct unpcb *unp;
{
}
#endif
+void
unp_shutdown(unp)
struct unpcb *unp;
{
socantrcvmore(so);
}
+void
unp_drop(unp, errno)
struct unpcb *unp;
int errno;
}
#endif
+int
unp_externalize(rights)
struct mbuf *rights;
{
return (0);
}
+int
unp_internalize(control, p)
struct mbuf *control;
struct proc *p;
}
int unp_defer, unp_gcing;
-int unp_mark();
extern struct domain unixdomain;
+void
unp_gc()
{
register struct file *fp;
unp_gcing = 0;
}
+void
unp_dispose(m)
struct mbuf *m;
{
- int unp_discard();
-
if (m)
unp_scan(m, unp_discard);
}
+void
unp_scan(m0, op)
register struct mbuf *m0;
- int (*op)();
+ void (*op)(struct file *);
{
register struct mbuf *m;
register struct file **rp;
}
}
+void
unp_mark(fp)
struct file *fp;
{
fp->f_flag |= (FMARK|FDEFER);
}
+void
unp_discard(fp)
struct file *fp;
{