What things should absolutely always/never be included in a header file?

Functions: what must go in the header file and what mustn't
Constants: Is it good practice to define lot of constants in a header file?
Any other good practices for C header files?

Example
I'm writing a parser for a documented industry standard format that has a lots of constants, is it a good practice to define them in a header file?

What to put in headers:

The minimal set of #include directives that are needed to make the header compilable when the header is included in some source file.
Preprocessor symbol definitions of things that need to be shared and that can only accomplished via the preprocessor. Even in C, preprocessor symbols are best kept to a minimum.
Forward declarations of structures that are needed to make the structure definitions, function prototypes, and global variable declarations in the body of the header compilable.
Definitions of data structures and enumerations that are shared amongst multiple source files.
Declarations for functions and variables whose definitions will be visible to the linker.
Inline function definitions, but take care here.

What doesn't belong in a header:

Gratuitous #include directives. Those gratuitous includes cause recompilation of things that don't need to be recompiled, and can at times make it so a system can't compile. Don't #include a file in a header if the header itself doesn't need that other header file.
Preprocessor symbols whose intent could be accomplished by some mechanism, any mechanism, other than the preprocessor.
Lots and lots of structure definitions. Split those up into separate headers.
Inline definitions of functions that require an additional #include, that are subject to change, or that are too big. Those inline functions should have little if any fan out, and if they do have fan out, it should be localized to stuff defined in the header.

What constitutes the minimal set of #include statements?
This turns out to be a nontrivial question. A TL;DR definition: A header file must include the header files that directly define each of the types directly used in or that directly declare each of the functions used in the header file in question, but must not include anything else. A pointer or C++ reference type does not qualify as direct use; forward references are preferred.
There is a place for a gratuitous #include directive, and this is in an automated test. For every header file in a software package, I automatically generate and then compile the following:
#include "path/to/random/header_under_test"
int main () { return 0; }

The compilation should be clean (i.e., free of any warnings or errors). Warnings or errors regarding incomplete types or unknown types mean that the header file under test has some missing #include directives and/or missing forward declarations. Note well: Just because the test passes does not mean that the set of #include directives is sufficient, let alone minimal.

Related

Naming Include Guards

