home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilss / sockets / include / sys / h / unpcb < prev    next >
Encoding:
Text File  |  1995-01-11  |  2.0 KB  |  57 lines

  1. /* -*-C-*-
  2.  *
  3.  * $Header: /ax/networking:include/sys/unpcb.h:networking  1.1  $
  4.  * $Source: /ax/networking:include/sys/unpcb.h: $
  5.  *
  6.  * Copyright (c) 1995 Acorn Computers Ltd., Cambridge, England
  7.  *
  8.  * $Log:    unpcb.h,v $
  9.  * Revision 1.1  95/01/11  10:20:10  kwelton
  10.  * Initial revision
  11.  * 
  12.  */
  13.  
  14. /*
  15.  * Copyright (c) 1982, 1986 Regents of the University of California.
  16.  * All rights reserved.
  17.  *
  18.  * Redistribution and use in source and binary forms are permitted
  19.  * provided that the above copyright notice and this paragraph are
  20.  * duplicated in all such forms and that any documentation,
  21.  * advertising materials, and other materials related to such
  22.  * distribution and use acknowledge that the software was developed
  23.  * by the University of California, Berkeley.  The name of the
  24.  * University may not be used to endorse or promote products derived
  25.  * from this software without specific prior written permission.
  26.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  27.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  28.  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  29.  *
  30.  *      @(#)unpcb.h     7.3 (Berkeley) 6/27/88
  31.  */
  32.  
  33. /*
  34.  * Protocol control block for an active
  35.  * instance of a RISC OS internal protocol.
  36.  *
  37.  * A socket may be connected to another socket, in which
  38.  * case the control block of the socket to which it is connected
  39.  * is given by unp_conn.
  40.  *
  41.  * Stream sockets keep copies of receive sockbuf sb_cc and sb_mbcnt
  42.  * so that changes in the sockbuf may be computed to modify
  43.  * back pressure on the sender accordingly.
  44.  */
  45. struct  unpcb {
  46.         struct  unpcb *unp_next, *unp_prev; /* queue pointers */
  47.         struct  socket *unp_socket;     /* pointer back to socket */
  48.         struct  unpcb *unp_conn;        /* control block of connected socket */
  49.         struct  mbuf *unp_addr;         /* bound address of socket */
  50.         int     unp_cc;                 /* copy of rcv.sb_cc */
  51.         int     unp_mbcnt;              /* copy of rcv.sb_mbcnt */
  52. };
  53.  
  54. #define sotounpcb(so)   ((struct unpcb *)((so)->so_pcb))
  55.  
  56. /* EOF unpcb.h */
  57.