[syslinux] finding mac address while in menusystem (com32)

H. Peter Anvin hpa at zytor.com
Wed Mar 5 09:37:39 PST 2008


Kjetil.Mikkelborg at kongsberg.com wrote:
> Thanks for your response,
> 
> but... I am not _that_ skilled in C,
> 
> how the heck can i get the information from either syslinux_ipappend_strings, or pxe_get_cached_info to be stored in a regular char array?
> every attempt ive tried so far results in just garbage printed out in my menu.
> 
> Any example code? (tried both linux.c and reading the libs, but still i really am messing up my code here.
> 

#include <stdio.h>
#include <syslinux/config.h>
#include <console.h>

int main(void)
{
	const struct syslinux_ipappend_strings *is;

	openconsole(&dev_stdcon_r, &dev_stdcon_w);

	is = syslinux_ipappend_strings();

	for (i = 0; i < is->count; i++) {
		printf("ipappend[%d] = \"%s\"\n", i, is->ptr[i]);
	}

	return 0;
}




More information about the Syslinux mailing list