title: Best place to define a struct for a library
body: <p>Currently I am writing a library for a communication protocol. For this task I need this struct:</p>
  
  <pre><code>typedef struct _C8B10 {
      unsigned int six :6;
      unsigned int four :4;
  } C8B10;
  </code></pre>
  
  <p>But where should I define it? I have one 'main' *.h-file that is included by all other libs. The *.c-files for each lib include only the 'parent' *.h-file. The structure is similar to a tree:</p>
  
  <pre><code>Main.h
        Main.c
    Child.h
        Child.c
    Child2.h
        Child2.c
    ....
  </code></pre>
  
  <p>The children always include the <code>Main.h</code> and the <code>child.c</code> their parents. But in one library I get the error, that the type is not defined.</p>
  
  <p>At the moment it is declared in the Main.h-file. But where is the best place to put it into?</p>