Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display Mac Address #10

Open
ajmmartinez opened this issue Dec 9, 2018 · 0 comments
Open

Display Mac Address #10

ajmmartinez opened this issue Dec 9, 2018 · 0 comments

Comments

@ajmmartinez
Copy link

Hi,

I'm trying to show the mac address of the host in the line before the ip address.

I'm not an experienced C programmer so maybe I'm not in the right way.

I get a segmentation fault when I do a printf

code inside sni_handler:

struct ether_header *p;

printf("Source: %02X:%02X:%02X:%02X:%02X:%02X\n"
p->ether_shost[0], p->ether_shost[1], p->ether_shost[2],
p->ether_shost[3], p->ether_shost[4], p->ether_shost[5],
);

Looking at the definition of the ether_header in some other codes , I see sone difference in the types.

Is it possible to show how do I need to do to print de mac address correctly ?

thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant