gqteway ip

dreamer의 이미지

c 언어 상에서 gatewayip를 알아 내는 방법은 없나요?
route table에 있으니까?
/proc/net/route 를 통해서 알아내야 하나요?