DNS Query Code in C with winsock

DNS Query Its no new fact that when we type a web address in our browser a dns request is immediately send by our browser to a DNS server to get the IP address of that web address.In winsock applications we achieve this by gethostbyname() and things are pretty simple.In this article we shall do this simple thing without the help ...

Packet Sniffer Code in C using Winsock

Winsock packet sniffer A packet sniffer is a program that can sniff the packets moving on the network. All applications communicate over the network with data packets where each packet contains part of the whole data being exchanged. A sniffer is able to pickup these individual packets and read them. In this post we are going to write a very simple packet ...

Raw socket programming on windows with winsock

Raw sockets using winsock Raw sockets or "Raw Packets", give you the facility to access the entire contents of a packet or datagram, both for reading and writing purpose. In other words, you can fabricate a whole packet according to your likes and dislikes. For example, a TCP packet would contain an IP header, a TCP header, and then the actual ...

C Program to print permutations of a string

Permutations Permutations is the set of all different unique arrangements of the letters of the string. So for the string "ABC" there are 6 permutations - ABC, ACB, BAC, BCA, CAB, CBA. The permutations can also be taken on a smaller length. For example if we want to get permutations of ABC over only 2 places then the permutations are - ...



Connect with us