There are multiple solutions. Semi-official Freescale way is OpenTCP (at sourceforge). But code really bad and not maintained for a long time. Another free solution is uIP, which can be ported to HCS12 (I was not used HCS12X) without large pain. There is Embetter source code, downloadable from Freescale site, but license not clear (at least for me). Cheap solution is uTasker, but I don't know how easy to port it to HCS12X. And, finally, a lot of commercial stacks (CMX, Interniche, etc). So, the question is: what exactly you need, which protocols you want to use and what is amount of money/time your project can tolerate.