The following example uses the C preprocessor to get the correct values of the defines in a format, which can be easily read by LaTeX.
The file defines_tex.c includes the needed headers surrounded by \iffalse and \fi. The preprocessor includes the header and
passes the TeX code through, because the TeX code does not contain preprocessor directives. Then TeX code follows, which defines the needed
macros with the defines as values, e.g.:
\newcommand*{\MebComPacketId}{MEB_COMP_PACKET_ID}
The this C file is run through the C preprocessor:
gcc -E -P defines_tex.c >defines_tex.tex
With enabled shell escape, the C preprocessor can be called
from within LaTeX or it is called before the LaTeX run.
The generatedTeX file is included as usual in LaTeX:
\input{defines_tex}
The header C code is ignored because of wrapping it in \iffalse and \fi.
(The C code should not accidently contain unmatched TeX conditionals or
unmatched braces.)
Full example:
\documentclass{article}
\usepackage{filecontents}
\usepackage{booktabs}
\usepackage{tabularx}
\begin{filecontents*}{defines_tex.c}
\iffalse
#include <stdio.h>
#include "defines.h"
\fi
\newcommand*{\MebComPacketId}{MEB_COM_PACKET_ID}
#ifdef MEB_COM_PACKET_NAME
\newcommand*{\MebComPacketName}{MEB_COM_PACKET_NAME}
#else
\newcommand*{\MebComPacketName}{unknown}
#endif
\newcommand*{\SeekCur}{SEEK_CUR}% from stdio.h
\end{filecontents*}
% Call of C preprocessor, when shell escape is enabled
\immediate\write18{gcc -E -P defines_tex.c >defines_tex.tex}
% Load the definition file
\input{defines_tex}
\begin{document}
% Use of the defined values
\begin{tabular}{ll}
\toprule
Variable & Value \\
\midrule
\verb|MEB_COM_PACKET_ID| & \MebComPacketId\\
\verb|MEB_COM_PACKET_NAME| & \MebComPacketName\\
\verb|SEEK_CUR| & \SeekCur\\
\bottomrule
\end{tabular}
\end{document}

defines.hfile only contain statements like that? – egreg May 12 '16 at 19:44