Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm experimenting with OMAPI as a means of giving our support staff additional insight into the state of a subscriber's service. Anyone who's ever played with OMAPI knows two things:

  1. The documentation is awful
  2. Assuming you get past the documentation's awfulness, the resulting objects contain hexadecimal representations of each value.

Now, I can convert IP addresses from the ab:ab:ab:ab format that they're returned in into dotted decimal without issue but does anyone know how to convert the other values into something sane, specifically, the start/end values.

Also, are the subnet values representative of the subnet mask assigned to the subscriber or are they related to something else? For example, I have a subscriber whose subnet mask is 255.255.224.0 but the subnet value returned by OMAPI is 00:00:00:09.

Update:

Okay, I've sussed out the starts/ends thing - basically, you remove the colons from the hexadecimal value, convert to int and then run it through, say, date() (PHP) or localtime() (Perl). E.g.,

4e:4a:03:74 becomes 4e4a0374, expressed as an int 1313473396 and then passed to date('Ymd G:i:s') to give us 20110816 6:43:16

I'm still not sure what the subnet value is (I mean, I'm guessing it somehow relates to the subnet mask but I'm not sure how).

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Okay, so in addition to figuring out the time stuff, I've also discovered (er... by reading the effin' manual, no less) that the 'subnet' and 'pool' keys refer to OMAPI objects for the subnet and pool declarations in dhcpd.conf. However, those objects can't currently be read.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.