title: Reusing existing linked list API implementation
body: <p>I have in the existing source base, linked list implementation(adding node, insertion, deletion , traversal) for the following structure:</p>
  
  <pre><code>typedef struct tagDirInfo
  {
    char *pdirName;
    struct tagDirInfo *__next;
    struct tagDirInfo *__prev;
  }DIR_HEADER;
  </code></pre>
  
  <p>Lets assume that char* pdirName points to the data part 
  I want to form a wrap up for the data part and reuse the existing APIs and so that, the new linked list structure has the data part as:</p>
  
  <pre><code>typedef struct printJob
  {
    char labelName[BUF_LEN];
    int priStatus;
    time_t time_stamp;
  }PRINTJOB;
  </code></pre>
  
  <p>I think if I do something like:</p>
  
  <pre><code>PRINTJOB newJob;
  /* Fill in newJob structure */
  DIR_HEADER *newNode;
  newNode-&gt;pdirName = (char*)newJob;
  newNode-&gt;__next = NULL;
  newNode-&gt;__prev = NULL;
  </code></pre>
  
  <p>Doing so, will fill in the linked list structure.</p>
  
  <p>But how can I access labelName data field through pdirName field of the linked list structure?</p>