Over the years APIs get changed on the course of technology development. This can put the programmer in a dilemma over continuing using deprecated functions or not.

Trying to solve this problem can be a little tricky. You can make your code insecure, ugly, hard to maintain and inefficient.

In this example we see the function inet_ntop(), which obsoleted inet_ntopa(). It has some clear advantages. It supports both IPV4 and IPV6, for example.

print

Download the source code.