Conv

Conv

概要

  • /sys/src/9/ip/ip.hにて定義
  • conversation directory.通信のセッションを表わすデータ構造?

実装

   70: /*
   71:  *  one per conversation directory
   72:  */
   73: struct Conv
   74: {
   75:         QLock;
   76: 
   77:         int    x;                 /* conversation index */
   78:         Proto* p;
   79: 
   80:         int    restricted;                /* remote port is restricted */
   81:         uint   ttl;                      /* max time to live */
   82:         uint   tos;                      /* type of service */
   83:         int    ignoreadvice;              /* don't terminate connection on icmp errors */
   84: 
   85:         uchar  ipversion;
   86:         uchar  laddr[IPaddrlen];        /* local IP address */
   87:         uchar  raddr[IPaddrlen];        /* remote IP address */
   88:         ushort lport;                  /* local port number */
   89:         ushort rport;                  /* remote port number */
   90: 
   91:         char   *owner;                   /* protections */
   92:         int    perm;
   93:         int    inuse;                     /* opens of listen/data/ctl */
   94:         int    length;
   95:         int    state;
   96: 
   97:         /* udp specific */
   98:         int    headers;           /* data src/dst headers in udp */
   99:         int    reliable;          /* true if reliable udp */
  100: 
  101:         Conv*  incall;                  /* calls waiting to be listened for */
  102:         Conv*  next;
  103: 
  104:         Queue* rq;                     /* queued data waiting to be read */
  105:         Queue* wq;                     /* queued data waiting to be written */
  106:         Queue* eq;                     /* returned error packets */
  107:         Queue* sq;                     /* snooping queue */
  108:         Ref    snoopers;          /* number of processes with snoop open */
  109: 
  110:         QLock  car;
  111:         Rendez cr;
  112:         char   cerr[ERRMAX];
  113: 
  114:         QLock  listenq;
  115:         Rendez listenr;
  116: 
  117:         Ipmulti        *multi;                        /* multicast bindings for this interface */
  118: 
  119:         void*  ptcl;                    /* protocol specific stuff */
  120: 
  121:         Route  *r;                      /* last route used */
  122:         ulong  rgen;                    /* routetable generation for *r */
  123: };