Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /****************************************************************************
- ringneckparrot (c)
- License: http://creativecommons.org/licenses/by-nc-sa/3.0/
- Contact Me:
- Email: ringneckparrot@hotmail.com
- Facebook: http://www.facebook.com/ringneckparrot
- Twitter ID: pp4rr0t
- SecurityTube: http://www.securitytube.net/user/ringneckparrot
- ****************************************************************************/
- //Typical Header Declaration
- #include <stdio.h>
- #include <stdlib.h>
- #include <netinet/in.h> // sockaddr_in
- #include <strings.h> // Bzero()
- main()
- {
- struct sockaddr_in info; // Create a sockaddr_in structure and name it "info"
- info.sin_family = AF_INET; // Define the address family as AF_INET
- info.sin_port = htons(1234); // Define the port as 1234, translated into Network byte order with htons()
- info.sin_addr.s_addr = INADDR_ANY; // Define the interface/s from which to accept
- bzero(&info.sin_zero, 8); // Zero the 8 bytes of the info.sin_zero that have to be zero
- // This does not use any memory
- // It just creates the structure
- // So you can create the socket on of it
- // It is not a complete program, if you compile it you won't get any errors,
- // but at this present situation, this program has no actual use
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement