HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to get transmitted and recieved packages o...
Operating System - HP-UX
1834557
Members
3106
Online
110069
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
12-01-2002 08:17 AM
12-01-2002 08:17 AM
how to get transmitted and recieved packages of an interface in C
Hello,
i'm wondering if there is no way to get the packages which com in and go out through my lan0 interface. Netstat -i provide exactly the informations i need. But i can't find a way how to get them in my own program. the mib funtions only provide octets or unicast packages. All that i don't need. I tryed to access DL_HP_INFO_ACK but DL_ERROR_ACK tels me, that the DLS don't know the requested primitive (other thinks like DL_INFO_REQ,DL_HP_PPA_REQ and so on are working quite well - but don't gave me the informations i need).. So there must be another way to get the packets which are trasmitted and recieved over an interface at all.. maybe nlist(kernel) then open(dev/mem) and lseek it for the ifnet structure? I played a bit arround with that.. no success too.
Any ideas, suggestions? Should i post the code i tryed with?
Thanks for help!
Greetings, Oliver
i'm wondering if there is no way to get the packages which com in and go out through my lan0 interface. Netstat -i provide exactly the informations i need. But i can't find a way how to get them in my own program. the mib funtions only provide octets or unicast packages. All that i don't need. I tryed to access DL_HP_INFO_ACK but DL_ERROR_ACK tels me, that the DLS don't know the requested primitive (other thinks like DL_INFO_REQ,DL_HP_PPA_REQ and so on are working quite well - but don't gave me the informations i need).. So there must be another way to get the packets which are trasmitted and recieved over an interface at all.. maybe nlist(kernel) then open(dev/mem) and lseek it for the ifnet structure? I played a bit arround with that.. no success too.
Any ideas, suggestions? Should i post the code i tryed with?
Thanks for help!
Greetings, Oliver
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2002 07:57 AM
12-02-2002 07:57 AM
Re: how to get transmitted and recieved packages of an interface in C
Oliver:
I looked at through the system and library calls and didn't see anything promissing.
You may want to consider an ugly approach. You could use the "system" library call to run the netstat command and direct the output to a file, then read the results back into your "C" program. A slicker way may be to use env variables.
Tom
I looked at through the system and library calls and didn't see anything promissing.
You may want to consider an ugly approach. You could use the "system" library call to run the netstat command and direct the output to a file, then read the results back into your "C" program. A slicker way may be to use env variables.
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2002 09:55 AM
12-02-2002 09:55 AM
Re: how to get transmitted and recieved packages of an interface in C
hi,
Maybe you can have a look on the following url :
http://hpux.connect.org.uk/hppd/hpux/Networking/Admin/libpcap-0.7.1/
rgds.
Steven
Maybe you can have a look on the following url :
http://hpux.connect.org.uk/hppd/hpux/Networking/Admin/libpcap-0.7.1/
rgds.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2002 11:32 AM
12-02-2002 11:32 AM
Re: how to get transmitted and recieved packages of an interface in C
Libpcap will have examples of some DLPI primitives, but I'm pretty sure that libpcap has no code to retrieve stats from DLPI, just to put interfaces into promiscuous mode and read the resulting packet stream.
There may be some examples of the stats DLPI primitive in the online docs at docs.hp.com.
The DLPI primitives are indeed the way to go. Don't forget that you will likely have to attach to the interface of interest prior to issuing the stats request.
There may be some examples of the stats DLPI primitive in the online docs at docs.hp.com.
The DLPI primitives are indeed the way to go. Don't forget that you will likely have to attach to the interface of interest prior to issuing the stats request.
there is no rest for the wicked yet the virtuous have no pillows
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
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP