Diff for /src/sys/netproto/ns/spp_usrreq.c between versions 1.9 and 1.10

version 1.9, 2004/06/02 14:43:03 version 1.10, 2004/06/04 01:46:49
Line 71  int spp_backoff[SPP_MAXRXTSHIFT+1] = Line 71  int spp_backoff[SPP_MAXRXTSHIFT+1] =
  * SP protocol implementation.   * SP protocol implementation.
  */   */
 void  void
spp_init()spp_init(void)
 {  {
   
         spp_iss = 1; /* WRONG !! should fish it out of TODR */          spp_iss = 1; /* WRONG !! should fish it out of TODR */
Line 85  u_short spp_newchecks[50]; Line 85  u_short spp_newchecks[50];
   
 /*ARGSUSED*/  /*ARGSUSED*/
 void  void
spp_input(m, nsp)spp_input(struct mbuf *m, struct nspcb *nsp)
        struct mbuf *m; 
        struct nspcb *nsp; 
 {  {
         struct sppcb *cb;          struct sppcb *cb;
         struct spidp *si = mtod(m, struct spidp *);          struct spidp *si = mtod(m, struct spidp *);
Line 299  int spprexmtthresh = 3; Line 297  int spprexmtthresh = 3;
  * packets up, and suppresses duplicates.   * packets up, and suppresses duplicates.
  */   */
 int  int
spp_reass(cb, si)spp_reass(struct sppcb *cb, struct spidp *si)
struct sppcb *cb; 
struct spidp *si; 
 {  {
         struct spidp_q *q;          struct spidp_q *q;
         struct mbuf *m;          struct mbuf *m;
Line 588  present: Line 584  present:
 }  }
   
 void  void
spp_ctlinput(cmd, arg)spp_ctlinput(int cmd, caddr_t arg)
        int cmd; 
        caddr_t arg; 
 {  {
         struct ns_addr *na;          struct ns_addr *na;
         struct ns_errp *errp = 0;          struct ns_errp *errp = 0;
Line 650  spp_ctlinput(cmd, arg) Line 644  spp_ctlinput(cmd, arg)
  * to one packet.  We will gradually open it again as we proceed.   * to one packet.  We will gradually open it again as we proceed.
  */   */
 void  void
spp_quench(nsp)spp_quench(struct nspcb *nsp)
        struct nspcb *nsp; 
 {  {
         struct sppcb *cb = nstosppcb(nsp);          struct sppcb *cb = nstosppcb(nsp);
   
Line 661  spp_quench(nsp) Line 654  spp_quench(nsp)
   
 #ifdef notdef  #ifdef notdef
 int  int
spp_fixmtu(nsp)spp_fixmtu(struct nspcb *nsp)
struct nspcb *nsp; 
 {  {
         struct sppcb *cb = (struct sppcb *)(nsp->nsp_pcb);          struct sppcb *cb = (struct sppcb *)(nsp->nsp_pcb);
         struct mbuf *m;          struct mbuf *m;
Line 709  struct nspcb *nsp; Line 701  struct nspcb *nsp;
 #endif  #endif
   
 int  int
spp_output(cb, m0)spp_output(struct sppcb *cb, struct mbuf *m0)
        struct sppcb *cb; 
        struct mbuf *m0; 
 {  {
         struct socket *so = cb->s_nspcb->nsp_socket;          struct socket *so = cb->s_nspcb->nsp_socket;
         struct mbuf *m;          struct mbuf *m;
Line 1124  send: Line 1114  send:
 int spp_do_persist_panics = 0;  int spp_do_persist_panics = 0;
   
 void  void
spp_setpersist(cb)spp_setpersist(struct sppcb *cb)
        struct sppcb *cb; 
 {  {
         int t = ((cb->s_srtt >> 2) + cb->s_rttvar) >> 1;          int t = ((cb->s_srtt >> 2) + cb->s_rttvar) >> 1;
   
Line 1142  spp_setpersist(cb) Line 1131  spp_setpersist(cb)
 }  }
 /*ARGSUSED*/  /*ARGSUSED*/
 int  int
spp_ctloutput(req, so, level, name, value)spp_ctloutput(int req, struct socket *so, int level,
        int req;                int name, struct mbuf **value)
        struct socket *so; 
        int name; 
        struct mbuf **value; 
 {  {
         struct mbuf *m;          struct mbuf *m;
         struct nspcb *nsp = sotonspcb(so);          struct nspcb *nsp = sotonspcb(so);
Line 1269  spp_ctloutput(req, so, level, name, valu Line 1255  spp_ctloutput(req, so, level, name, valu
 #warning "spp_usrreq not converted to FreeBSD usrreq style! watch out!"  #warning "spp_usrreq not converted to FreeBSD usrreq style! watch out!"
 /*ARGSUSED*/  /*ARGSUSED*/
 int  int
spp_usrreq(so, req, m, nam, controlp)spp_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
        struct socket *so;            struct mbuf *controlp)
        int req; 
        struct mbuf *m, *nam, *controlp; 
 {  {
         int error = 0;          int error = 0;
 #ifdef OBSOLETE         /* not converted to FreeBSD usrreq style XXX */  #ifdef OBSOLETE         /* not converted to FreeBSD usrreq style XXX */
Line 1526  release: Line 1510  release:
 }  }
   
 int  int
spp_usrreq_sp(so, req, m, nam, controlp)spp_usrreq_sp(struct socket *so, int req, struct mbuf *m,
        struct socket *so;                struct mbuf *nam, struct mbuf *controlp)
        int req; 
        struct mbuf *m, *nam, *controlp; 
 {  {
         int error = spp_usrreq(so, req, m, nam, controlp);          int error = spp_usrreq(so, req, m, nam, controlp);
   
Line 1548  spp_usrreq_sp(so, req, m, nam, controlp) Line 1530  spp_usrreq_sp(so, req, m, nam, controlp)
  * minimizing the amount of work necessary when the connection is used.   * minimizing the amount of work necessary when the connection is used.
  */   */
 void  void
spp_template(cb)spp_template(struct sppcb *cb)
        struct sppcb *cb; 
 {  {
         struct nspcb *nsp = cb->s_nspcb;          struct nspcb *nsp = cb->s_nspcb;
         struct idp *idp = cb->s_idp;          struct idp *idp = cb->s_idp;
Line 1576  spp_template(cb) Line 1557  spp_template(cb)
  *      wake up any sleepers   *      wake up any sleepers
  */   */
 struct sppcb *  struct sppcb *
spp_close(cb)spp_close(struct sppcb *cb)
        struct sppcb *cb; 
 {  {
         struct spidp_q *s;          struct spidp_q *s;
         struct nspcb *nsp = cb->s_nspcb;          struct nspcb *nsp = cb->s_nspcb;
Line 1605  spp_close(cb) Line 1585  spp_close(cb)
  *      For now, just close.   *      For now, just close.
  */   */
 struct sppcb *  struct sppcb *
spp_usrclosed(cb)spp_usrclosed(struct sppcb *cb)
        struct sppcb *cb; 
 {  {
         return (spp_close(cb));          return (spp_close(cb));
 }  }
   
 struct sppcb *  struct sppcb *
spp_disconnect(cb)spp_disconnect(struct sppcb *cb)
        struct sppcb *cb; 
 {  {
         return (spp_close(cb));          return (spp_close(cb));
 }  }
   
 /*  /*
  * Drop connection, reporting   * Drop connection, reporting
  * the specified error.   * the specified error.
  */   */
 struct sppcb *  struct sppcb *
spp_drop(cb, errno)spp_drop(struct sppcb *cb, int errno)
        struct sppcb *cb; 
        int errno; 
 {  {
         struct socket *so = cb->s_nspcb->nsp_socket;          struct socket *so = cb->s_nspcb->nsp_socket;
   
Line 1643  spp_drop(cb, errno) Line 1621  spp_drop(cb, errno)
 }  }
   
 void  void
spp_abort(nsp)spp_abort(struct nspcb *nsp)
        struct nspcb *nsp; 
 {  {
        spp_close((struct sppcb *)nsp->nsp_pcb);
        (void) spp_close((struct sppcb *)nsp->nsp_pcb); 
 }  }
   
 /*  /*
  * Fast timeout routine for processing delayed acks   * Fast timeout routine for processing delayed acks
  */   */
 void  void
spp_fasttimo()spp_fasttimo(void)
 {  {
         struct nspcb *nsp;          struct nspcb *nsp;
         struct sppcb *cb;          struct sppcb *cb;
Line 1679  spp_fasttimo() Line 1655  spp_fasttimo()
  * causes finite state machine actions if timers expire.   * causes finite state machine actions if timers expire.
  */   */
 void  void
spp_slowtimo()spp_slowtimo(void)
 {  {
         struct nspcb *ip, *ipnxt;          struct nspcb *ip, *ipnxt;
         struct sppcb *cb;          struct sppcb *cb;
Line 1721  tpgone: Line 1697  tpgone:
  * SPP timer processing.   * SPP timer processing.
  */   */
 struct sppcb *  struct sppcb *
spp_timers(cb, timer)spp_timers(struct sppcb *cb, int timer)
        struct sppcb *cb; 
        int timer; 
 {  {
         long rexmt;          long rexmt;
         int win;          int win;

Removed from v.1.9  
changed lines
  Added in v.1.10