mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-04 12:52:15 +00:00
Garbage collect unused (and incompletely implemented) functions:
- ipx_pcbnotify(), which is never called. - ipx_rtchange(), which is never called, is incomplete inplemented, and also #ifdef notdef. - spx_fixmtu(), which is never called, is incompletely implemented, and also #ifdef notdef.
This commit is contained in:
parent
05b4b08b61
commit
ffeb1a497a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=139443
@ -308,61 +308,6 @@ ipx_setpeeraddr(ipxp, nam)
|
||||
*nam = sodupsockaddr((struct sockaddr *)sipx, M_NOWAIT);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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(dst, errno, notify, param)
|
||||
register struct ipx_addr *dst;
|
||||
int errno;
|
||||
void (*notify)(struct ipxpcb *);
|
||||
long param;
|
||||
{
|
||||
register struct ipxpcb *ipxp, *oinp;
|
||||
int s = splimp();
|
||||
|
||||
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 (errno)
|
||||
ipxp->ipxp_socket->so_error = errno;
|
||||
oinp = ipxp;
|
||||
ipxp = ipxp->ipxp_next;
|
||||
oinp->ipxp_notify_param = param;
|
||||
(*notify)(oinp);
|
||||
}
|
||||
splx(s);
|
||||
}
|
||||
|
||||
#ifdef notdef
|
||||
/*
|
||||
* After a routing change, flush old routing
|
||||
* and allocate a (hopefully) better one.
|
||||
*/
|
||||
ipx_rtchange(ipxp)
|
||||
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(faddr, lport, wildp)
|
||||
struct ipx_addr *faddr;
|
||||
|
@ -52,7 +52,6 @@ struct ipxpcb {
|
||||
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() */
|
||||
@ -92,8 +91,6 @@ void ipx_pcbdetach(struct ipxpcb *ipxp);
|
||||
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 errno,
|
||||
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 */
|
||||
|
@ -695,56 +695,6 @@ spx_ctlinput(cmd, arg_as_sa, dummy)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef notdef
|
||||
int
|
||||
spx_fixmtu(ipxp)
|
||||
register struct ipxpcb *ipxp;
|
||||
{
|
||||
register struct spxpcb *cb = (struct spxpcb *)(ipxp->ipxp_pcb);
|
||||
register struct mbuf *m;
|
||||
register struct spx *si;
|
||||
struct ipx_errp *ep;
|
||||
struct sockbuf *sb;
|
||||
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;
|
||||
sb = &ipxp->ipxp_socket->so_snd;
|
||||
cb->s_mtu = ep->ipx_err_param;
|
||||
badseq = SI(&ep->ipx_err_ipx)->si_seq;
|
||||
for (m = sb->sb_mb; m != NULL; m = m->m_act) {
|
||||
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(cb, m0)
|
||||
register struct spxpcb *cb;
|
||||
|
Loading…
Reference in New Issue
Block a user