*nam = dup_sockaddr((struct sockaddr *)sipx);
}
-/*
- * Pass some notification to all connections of a protocol
- * associated with address dst. Call the
- * protocol specific routine to handle each connection.
- * Also pass an extra paramter via the ipxpcb. (which may in fact
- * be a parameter list!)
- */
-void
-ipx_pcbnotify(struct ipx_addr *dst, int error,
- void (*notify)(struct ipxpcb *), long param)
-{
- struct ipxpcb *ipxp, *oinp;
-
- crit_enter();
-
- for (ipxp = (&ipxpcb)->ipxp_next; ipxp != (&ipxpcb);) {
- if (!ipx_hosteq(*dst,ipxp->ipxp_faddr)) {
- next:
- ipxp = ipxp->ipxp_next;
- continue;
- }
- if (ipxp->ipxp_socket == 0)
- goto next;
- if (error)
- ipxp->ipxp_socket->so_error = error;
- oinp = ipxp;
- ipxp = ipxp->ipxp_next;
- oinp->ipxp_notify_param = param;
- (*notify)(oinp);
- }
- crit_exit();
-}
-
-#ifdef notdef
-/*
- * After a routing change, flush old routing
- * and allocate a (hopefully) better one.
- */
-void
-ipx_rtchange(struct ipxpcb *ipxp)
-{
- if (ipxp->ipxp_route.ro_rt != NULL) {
- rtfree(ipxp->ipxp_route.ro_rt);
- ipxp->ipxp_route.ro_rt = NULL;
- /*
- * A new route can be allocated the next time
- * output is attempted.
- */
- }
- /* SHOULD NOTIFY HIGHER-LEVEL PROTOCOLS */
-}
-#endif
-
struct ipxpcb *
ipx_pcblookup(struct ipx_addr *faddr, int lport, int wildp)
{
caddr_t ipxp_pcb; /* protocol specific stuff */
struct route ipxp_route; /* routing information */
struct ipx_addr ipxp_lastdst; /* validate cached route for dg socks*/
- long ipxp_notify_param; /* extra info passed via ipx_pcbnotify*/
short ipxp_flags;
u_char ipxp_dpt; /* default packet type for ipx_output */
u_char ipxp_rpt; /* last received packet type by ipx_input() */
void ipx_pcbdisconnect (struct ipxpcb *ipxp);
struct ipxpcb *
ipx_pcblookup (struct ipx_addr *faddr, int lport, int wildp);
-void ipx_pcbnotify (struct ipx_addr *dst, int error,
- void (*notify)(struct ipxpcb *), long param);
void ipx_setpeeraddr (struct ipxpcb *ipxp, struct sockaddr **nam);
void ipx_setsockaddr (struct ipxpcb *ipxp, struct sockaddr **nam);
#endif /* _KERNEL */
lwkt_replymsg(&msg->lmsg, 0);
}
-#ifdef notdef
-int
-spx_fixmtu(struct ipxpcb *ipxp)
-{
- struct spxpcb *cb = (struct spxpcb *)(ipxp->ipxp_pcb);
- struct mbuf *m;
- struct spx *si;
- struct ipx_errp *ep;
- struct signalsockbuf *ssb;
- int badseq, len;
- struct mbuf *firstbad, *m0;
-
- if (cb != NULL) {
- /*
- * The notification that we have sent
- * too much is bad news -- we will
- * have to go through queued up so far
- * splitting ones which are too big and
- * reassigning sequence numbers and checksums.
- * we should then retransmit all packets from
- * one above the offending packet to the last one
- * we had sent (or our allocation)
- * then the offending one so that the any queued
- * data at our destination will be discarded.
- */
- ep = (struct ipx_errp *)ipxp->ipxp_notify_param;
- ssb = &ipxp->ipxp_socket->so_snd;
- cb->s_mtu = ep->ipx_err_param;
- badseq = ep->ipx_err_ipx.si_seq;
- for (m = ssb->ssb_mb; m != NULL; m = m->m_nextpkt) {
- si = mtod(m, struct spx *);
- if (si->si_seq == badseq)
- break;
- }
- if (m == NULL)
- return;
- firstbad = m;
- /*for (;;) {*/
- /* calculate length */
- for (m0 = m, len = 0; m != NULL; m = m->m_next)
- len += m->m_len;
- if (len > cb->s_mtu) {
- }
- /* FINISH THIS
- } */
- }
-}
-#endif
-
static int
spx_output(struct spxpcb *cb, struct mbuf *m0)
{