Difference between net.core.rmem_max and net.ipv4.tcp_rmem

What's the difference between net.core.rmem_max and the third value of net.ipv4.tcp_rmem? Which has the higher priority for tcp connections?

For below two examples, what's the max buffer for tcp connections?

Case 1:
sysctl -w net.core.rmem_max=7388608
sysctl -w net.ipv4.tcp_rmem='4096 87380 8388608'

Case 2:
sysctl -w net.core.rmem_max=8388608
sysctl -w net.ipv4.tcp_rmem='4096 87380 7388608'

Core is the overall max receive buffer, while tcp relates to just that protocol.

As for the priority-question: It seems that the tcp-setting will take precendence over the common max setting, which is a bit confusing. Setting max has no effect on the current tcp setting (just tested on CentOS 5).

A more correct description would have been: default_max - but that was propably too longish.