Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: syslinux: users

finding mac address while in menusystem (com32)

 

 

syslinux users RSS feed   Index | Next | Previous | View Threaded


Kjetil.Mikkelborg at kongsberg

Mar 3, 2008, 2:46 AM

Post #1 of 4 (7810 views)
Permalink
finding mac address while in menusystem (com32)

Hi

I have made myself a derivated menusystem based on the complex.c menu that cames with syslinux.
And now I need to read a file, search for my pxebooted netcards mac address, and write some changes back to the same file.
All the writing and reading I hopes will be of no trouble, but how can i find my own mac address? (and IP adress would be nice).

I have searched the list, but I really cannot find any hints on this, so either I am trying to do something unusual, or I am blind to how to do it!

Thanks for any reply

--Kjetil
_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX [at] zytor
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.


stappers at stappers

Mar 3, 2008, 4:12 AM

Post #2 of 4 (7410 views)
Permalink
Re: finding mac address while in menusystem (com32) [In reply to]

Op 03-03-2008 om 11:46 schreef Kjetil.Mikkelborg [at] kongsberg:
> Hi
>
> I have made myself a derivated menusystem based on the complex.c menu
> that cames with syslinux.
> And now I need to read a file, search for my pxebooted netcards mac
> address, and write some changes back to the same file.
> All the writing and reading I hopes will be of no trouble, but how
> can i find my own mac address? (and IP adress would be nice).
>
> I have searched the list, but I really cannot find any hints on this,
> so either I am trying to do something unusual, or I am blind to how
> to do it!

What I remember for reading this list, there were some ideas about
reading the PXE structure that the PXE stack provides.

So keywords for search the list archive again would be
PXE structure stack


Cheers
Geert Stappers

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX [at] zytor
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.


wferi at niif

Mar 3, 2008, 5:24 AM

Post #3 of 4 (7432 views)
Permalink
Re: finding mac address while in menusystem (com32) [In reply to]

<Kjetil.Mikkelborg [at] kongsberg> writes:

> how can i find my own mac address? (and IP adress would be nice).

See com32/modules/linux.c for example.
--
Regards,
Feri.

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX [at] zytor
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.


hpa at zytor

Mar 3, 2008, 9:33 AM

Post #4 of 4 (7429 views)
Permalink
Re: finding mac address while in menusystem (com32) [In reply to]

Kjetil.Mikkelborg [at] kongsberg wrote:
> Hi
>
> I have made myself a derivated menusystem based on the complex.c menu that cames with syslinux.
> And now I need to read a file, search for my pxebooted netcards mac address, and write some changes back to the same file.
> All the writing and reading I hopes will be of no trouble, but how can i find my own mac address? (and IP adress would be nice).
>
> I have searched the list, but I really cannot find any hints on this, so either I am trying to do something unusual, or I am blind to how to do it!
>

There are three ways to do it:

a) the easy way:

* Use syslinux_ipappend_strings() (from <syslinux/config.h>)

This gets you the ip= and BOOTIF= strings, which contain your
ip address and hardware address, respectively.

b) the hard way:

* pxe_get_cached_info() gets you the DHCP information
(from <syslinux/pxe.h>).

This includes both your IP address and the hardware address. Do note
that the hardware address can be encoded in two different ways,
depending on the underlying medium (e.g. Infinibad does it
differently than Ethernet.)

This is effectively what PXELINUX does internally.

c) the really hard way:

* Use pxe_get_cached_info() to get the IP address, and PXE call
0x000C (PXENV_UNDI_GET_INFORMATION) to get the hardware address.

I don't have a librarized version of PXENV_UNDI_GET_INFORMATION at
this time.

-hpa


_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX [at] zytor
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.

syslinux users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.