× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.






I have a quick and dirty CL program to display the ARP table.  Have a look
here for DSPARP:
http://home.columbus.rr.com/jbmmdietz/iseries.html


-------------------------
 Bryan Dietz
3X Corporation
614-410-9205





rpg400-l-bounces@xxxxxxxxxxxx wrote on 11/20/2003 12:23:15 PM:

>
> > Is there any way to tell the MAC address of the client that is
connected
> > to my RPG program?  I need to be able to determine if that client has
> > connected previously and I can't use the IP address because of DHCP.  I
> > am open to other suggestions as well.
>
> You can do that, but bear in mind that the MAC address is only relevant
if
> your clients will always be on the same ethernet segment as your iSeries
> is.
>
> Here's what you'll need to do to get the MAC address:
>
>    1)  Get the connected computer's IP address.  You can use the QDCRDEVD
>          API with format DEVD0600 to do that.
>    2)  Get the "line name" of your ethernet card.  I've always hard-coded
>          this, since we have only one ethernet card, but I imagine
>          there's a way to get this with APIs as well?   Mines LIN051 :)
>    3)  Call the QtocLstPhyIfcARPTbl API.  This lists the ARP table for
>          a given ethernet card to a UsrSpc.   (ARP = Address Resolution
>          Protocol... an ARP table corresponds MAC addresses with IP
>          addresses)
>    4)  Loop through the UsrSpc and find the entry that matches the IP
>          address from step 1.  The MAC address will be in the
>          "Physical address" field of the ARPT0100 format.
>
> Let me know if you need some sample code...


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.