Searching google and the forums for this answer mostly matches block size debate questions, which is not what I'm after.
When a block is transmitted across the network or stored on disk:
1. Where is the size of the actual block stored in the message? Do you just send a TCP message ahead of the block that says "hey, the next block is 875,489 bytes long!" or is it encoded somewhere in to the block structure itself (apparently it isn't in the block header)?
2. Similarly, on disk, where is the record of how big each block is (so the filesystem knows how much data to read)? Is that in the chain state database, or it is stored in the BLK*.dat files themselves? Or somewhere else?
Basically, I'm trying to understand, from a systems programming perspective, how you tell the storage/TCP layers how much data to read and write from/to disk/network.