I'm new to network programming. And I skimmed a few pages of beej programming guide and found some useful info but couldn't clear one doubt. We use bind to associate a sockaddr_in structure with the socket descriptor so that the kernel can send data to the network adapter and thereby communicate right. So I noticed the symbolic name INADDR_ANY. I tried a pre-processing only option in my gcc compiler and found the IP to be hexadecimal value of 127.0.0.1 the loop back IP. I'm just wondering what if I assigned a random IP of my choice to the s_addr pointer in the sockaddr_in structure instead of assigning it to INADDR_ANY. Would that mean i'm spoofing my IP?
timetraveller1992 10 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.