P2P messages sent by bitcoin nodes and service flags: bitcoin/src/protocol.cpp at baed5edeb611d949982c849461949c645f8998a7 · bitcoin/bitcoin · GitHub
Interesting functions:
HasAllDesirableServiceFlags()
Misbehaving()
MaybePunishNodeForBlock()
MaybePunishNodeForTx()
ProcessCompactBlockTxns()
ProcessMessage()
MaybeDiscourageAndDisconnect()
AttemptToEvictConnection()
ReattemptInitialBroadcast()
Process used to relay transactions for better privacy in section Message: inventory is interesting as well.