HAP is Host's proprietary messaging and configuration layer that sits on top of UDP, IPX, and some others, and implements our basic Ethernet behaviors. It has bunches of function codes, including codes for CCM (DirectNet), K Sequence, and our new MX controller protocol. Those codes essentially allow us to package up a CCM request and send it over HAP to a waiting PLC, who processes the CCM request, and returns the response via HAP.
In general it isn't necessary to know HAP...just use our interface library. It's free, it works (it's what we use), and if you need the source, we've even been known to provide it to folks that ask. Although unless you plan on porting it, just use the DLL...much simpler.
I'm actually at ADC right now, but I'm sure one of the other guys back at the ranch can help you.