Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 913 Bytes

README.md

File metadata and controls

29 lines (19 loc) · 913 Bytes

Domain to IPv4 Converter in C

This project provides a simple command-line tool written in C to convert domain names to their corresponding IPv4 addresses. It uses the getaddrinfo function from the netdb.h library to perform DNS resolution and retrieve IP addresses associated with a given domain name.

Usage

Simply compile the provided source code and run the executable with the domain name as an argument.

$ gcc domain_to_ipv4.c -o domain_to_ipv4
$ ./domain_to_ipv4
Usage: ./domain_to_ipv4 <domain>
$ ./domain_to_ipv4 example.com
93.184.216.34

Resources