The startup scripts reside in the /etc/init.d directory. If you look at the S40network script you should find the command that brings up the "wan" interface:
ifup wan
The "ifup" command is actually a script. Take a look at /sbin/ifup. In that script you will see where it parses the nvram variables and when it comes across "wan_proto" you'll see a section that gets executed when an interface is set to dhcp. This is where the call to "udhcp" is.
If you just want to view your gateway and ip address information you can use a few commands like "ifconfig", "ip", and "netstat". For instance, "netstat -rn" will show you your routing table. "ifconfig" will list all the interfaces and their currently configured ip address information. The "ip" command can also show you various IP information about your interface(s). "ip addr" and "ip route" will show you somewhat similar information.
Your DNS server information goes in /etc/resolv.conf. If configured by DHCP you will find a /tmp/resolv.conf. You might want to symbolic link /etc/resolv.conf to /tmp/resolv.conf if you want to use your provider's DNS servers for resolution.