• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Fetcth the Router's Mac Address

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there, I have heard somewhere that there might be a way to fetch the Router's MAC address from the Request/Session. Anyone knows anything about it?
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The MAC address is part of the layer 2 (data link) layer of the tcp/ip stack. However, the java.net libraries don't really provide access to the lower layers of the tcp/ip packets. Instead, the libraries provide access to layer 3 and layer 4 of the stack, specifically the IP and TCP parameters, such as IP address and ports.

You may want to try java "raw sockets" if you need access to the lower levels of the tcp/ip stack.

Originally posted by Oren Gross:
Hi there, I have heard somewhere that there might be a way to fetch the Router's MAC address from the Request/Session. Anyone knows anything about it?

 
joseph edwards
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you know the router's IP address, you can also get the MAC address by using RARP (Reverse Address Resolution Protocol).

Take a look at the jPcap library package, which uses the raw sockets API / libpcap libs, and supports the following protocols Ethernet, IPv4, IPv6, ARP/RARP, TCP, UDP, ICMPv4
 
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic