# What is my ip address?

**URL:** https://forums.digi.com/t/what-is-my-ip-address/5756
**Category:** NET+OS
**Created:** [February 5, 2004, 2:35pm UTC](https://forums.digi.com/t/what-is-my-ip-address/5756 "2004-02-05T14:35:36Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex016/uploads/digi/original/1X/11da31a6a1fbcd03ef21d3f785c317c824009ae2.png) [@system](https://forums.digi.com/u/system)
#### Post date: [February 5, 2004, 2:35pm UTC](https://forums.digi.com/t/what-is-my-ip-address/5756/1 "2004-02-05T14:35:36Z")

</div>

Probably an easy one, but I cannot find it in the documentation… I have turned on DHCP and it is requesting and getting an address. What system call or variable can return this address? I’ve found the DhcpNowBound call and I could cache this value, but I wondered if there was a way of retrieving it on demand as DhcpNowBound would not be called if there was a static ip address. Thanks, Martin

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex016/uploads/digi/original/1X/11da31a6a1fbcd03ef21d3f785c317c824009ae2.png) [@system](https://forums.digi.com/u/system)
#### Post date: [April 7, 2004, 9:38am UTC](https://forums.digi.com/t/what-is-my-ip-address/5756/2 "2004-04-07T09:38:45Z")

</div>

See in the file dhcpstub.c Function void DhcpNowBound(unsigned long ipAddr, unsigned long mask, unsigned long gateway) This is a callback function. Can be included from your application. Have a Nice day !
