I'm trying to write a customized packet sniffer. I don't want to use ethereal or something similar because it's far too advanced for the purposes I want to use it for, not to mention I want to customize my packet sniffer's behavior anyway.

I have done SO many searches on the internet, I have asked so many of my Counterstrike buddies who program, and I am simply completely lost. I have no idea where to even start. All I know is that I need to be able to access my NIC (in my case, ethernet card) from C++, so that I can monitor the packets coming into it, and going out of it.

I know that this is a very broad question, and I debated whether or not to post, but I simply am out of ideas. I can't find help anywhere else. Does anyone know where a good place to start is, as far as learning how to program my NIC? Please, any help at all is going to help me.

cheers,
drmario