1: #include <stdio.h>
   2: #include <sys/types.h>
   3: #include <netns/ns.h>
   4: #include <netns/sp.h>
   5: #include "Clearinghouse_support.c"
   6: #include <xnscourier/except.h>
   7: #define MAXPACKS 5
   8: #define nextSegment_case nextSegment2_33_case
   9: #define lastSegment_case lastSegment2_34_case
  10: 
  11: ProcessObjectName(obj)
  12:     ObjectName obj;
  13: {
  14:     printf("\t%s:%s:%s\n", obj.object, obj.domain, obj.organization);
  15: }
  16: 
  17: GetData(conn)
  18:     CourierConnection *conn;
  19: {
  20:     int count, i;
  21:     Unspecified buffer[MAXWORDS*MAXPACKS], *bp, *bufend;
  22:     StreamOfObjectName obnames;
  23: 
  24:     bufend = buffer;
  25:     bp = buffer+((MAXWORDS-1)*MAXPACKS);    /* end of available space */
  26:     while (count = BDTread(conn, (char*)bufend,
  27:                 MAXWORDS*sizeof(Unspecified))
  28:         ) {
  29:         bufend += count/sizeof(Unspecified);
  30:         if (bufend > bp) {
  31:             fprintf(stderr,"BDT read too big to fit\n");
  32:             BDTabort(conn);
  33:             /* should clear out stuff here if we knew how much */
  34:         }
  35:     }
  36:     bp = buffer;
  37:     while (bp < bufend) {
  38:         bp += internalize_StreamOfObjectName(&obnames,bp);
  39:         if (0 == (int) obnames.designator)
  40:            for (i = 0; i < obnames.nextSegment_case.segment.length; i++)
  41:             ProcessObjectName(
  42:                 obnames.nextSegment_case.segment.sequence[i]);
  43:         else {
  44:            for (i = 0; i < obnames.lastSegment_case.length; i++)
  45:             ProcessObjectName(
  46:                 obnames.lastSegment_case.sequence[i]);
  47:            return;
  48:         }
  49:     }
  50: }

Defined functions

GetData defined in line 17; used 2 times
ProcessObjectName defined in line 11; used 2 times

Defined macros

MAXPACKS defined in line 7; used 2 times
lastSegment_case defined in line 9; used 2 times
nextSegment_case defined in line 8; used 2 times
Last modified: 1986-03-13
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 447
Valid CSS Valid XHTML 1.0 Strict