Do you see they mention a reference: http://security-freak.net/raw-sockets/raw-sockets.html which was later removed as the site is now down. Both the code + the reference was added by the same author on wikipedia on the same day in 2011.
No, but the key one is "/* A simple write on the socket ..thats all it takes ! */" which the author said was rather distinctive, and I would have to agree. (In fact, it was the search I used to find this example.)
How it got onto Wikipedie is another question (might have been on en, ru, or other wiki and translated).
I'm not sure whence the code was lifted, but it would not surprise me if they just grabbed some code from Wikipedia and assumed it was freely usable.