C program to Get Computer System IP Address in Linux
All Answers
total answers (1)
Severity: 8192
Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
Filename: libraries/Filtered_db.php
Line Number: 23
total answers (1)
Get IP Address in Linux using C program
Output:
struct ifreq
ifreq is basically used to configure Network Interface Devices. Firstly, we should provide ifreq to define the name of Interface Device.
This structure contains other structures too, but here we are using structure struct sockaddr ifr_addr.
need an explanation for this answer? contact us directly to get an explanation for this answerThis structure contains a member named sin_addr that stores ip address of the system