HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Issues with libnet library api : libnet_get_hwaddr...
Operating System - HP-UX
1827713
Members
2743
Online
109967
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2009 04:34 AM
09-08-2009 04:34 AM
Issues with libnet library api : libnet_get_hwaddr()
Hi,
In our project we are porting code from windows to HP-UX (PA-RISC and ITANIUM) systems. We are using the libnet library to get the hardware(MAC) address on the local system using libnet_get_hwaddr() api.
We are getting an run time error :
libnet_get_hwaddr(): send_request(): putmsg "physaddr": Not a stream.
We are invoking the function as below:
cp = (char*)libnet_get_hwaddr(libnet);
It would be helpful if anyone who had faced the same issue help us in this regard.
Thanks,
Ramya
In our project we are porting code from windows to HP-UX (PA-RISC and ITANIUM) systems. We are using the libnet library to get the hardware(MAC) address on the local system using libnet_get_hwaddr() api.
We are getting an run time error :
libnet_get_hwaddr(): send_request(): putmsg "physaddr": Not a stream.
We are invoking the function as below:
cp = (char*)libnet_get_hwaddr(libnet);
It would be helpful if anyone who had faced the same issue help us in this regard.
Thanks,
Ramya
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2009 06:20 AM
09-08-2009 06:20 AM
Re: Issues with libnet library api : libnet_get_hwaddr()
check error code for libnet_init()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2009 08:12 PM
09-08-2009 08:12 PM
Re: Issues with libnet library api : libnet_get_hwaddr()
Hi,
libnet_init is successful and i am able to retrieve the host IP address. We are coding as below:
if (libnet) {
/* prolly going to switch interface from temp to real */
libnet_destroy(libnet);
libnet = 0;
}
if (!(libnet = libnet_init(LIBNET_RAW4,
(char*)ifname,
ebuf)))
{
printf("libnet_init failed with error:%s",ebuf);
exit(1);
}
if (-1 == (srcip = libnet_get_ipaddr4(libnet))) {
fprintf(stderr, "arping: libnet_get_ipaddr4(libnet): "
"%s\n", libnet_geterror(libnet));
exit(1);
}
if (!(cp = (char*)libnet_get_hwaddr(libnet))) {
fprintf(stderr, "arping: libnet_get_hwaddr(): %s\n",
libnet_geterror(libnet));
exit(1);
}
So i thing there is no issues with the libnet_init().
Thanks,
Ramya
libnet_init is successful and i am able to retrieve the host IP address. We are coding as below:
if (libnet) {
/* prolly going to switch interface from temp to real */
libnet_destroy(libnet);
libnet = 0;
}
if (!(libnet = libnet_init(LIBNET_RAW4,
(char*)ifname,
ebuf)))
{
printf("libnet_init failed with error:%s",ebuf);
exit(1);
}
if (-1 == (srcip = libnet_get_ipaddr4(libnet))) {
fprintf(stderr, "arping: libnet_get_ipaddr4(libnet): "
"%s\n", libnet_geterror(libnet));
exit(1);
}
if (!(cp = (char*)libnet_get_hwaddr(libnet))) {
fprintf(stderr, "arping: libnet_get_hwaddr(): %s\n",
libnet_geterror(libnet));
exit(1);
}
So i thing there is no issues with the libnet_init().
Thanks,
Ramya
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP