How do you get the ip address from within nvidia fortran code

I can get the hostname using

call hostnm(hostname),

but how do I check the username or ip address from within a nvidia fortran code?

I guess you have to do a system call…?