- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: DLPI Programmer's Guide Question
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО01-30-2004 04:24 AM
тАО01-30-2004 04:24 AM
DLPI Programmer's Guide Question
I am working with the "DLPI Programmer's Guide HP-UX 11i v2" ioctl example program and have a few questions. Please note, that I have examined both the sys/dlpi.h and sys/dlph_ext.h for the structures mentioned below and they do not exist in my files. The link to the source documentation is listed below:
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90809/B2355-90809_top.html&con=/hpux/onlinedocs/B2355-90809/00/00/25-con.html&toc=/hpux/onlinedocs/B2355-90809/00/00/25-toc.html&searchterms=duplex%7cioctl&queryid=20040130-100605
Question 1: The guide describes the DL_HP_GET_DRV_PARAM_IOCTL and DL_HP_SET_DRV_PARAM_IOCTL definitions but never defines how these IOCTL calls should be defined. What are the correct definitions for these calls?
Question 2: The guide describes the DL_HP_DRV_MTU and DL_HP_SERIALIZE definitions but never details how they should be defined. What are the correct definitions for these calls?
What I have put together so far is listed below but, note I still am not able to get this to compile correctly.
#include
#include
#include
#include
#include
#include
typedef struct dl_hp_get_drv_param_ioctl {
dl_hp_drv_param_req_type_t dl_request;
uint32_t dl_speed;
dl_hp_duplex_mode_t dl_duplex;
dl_hp_autoneg_sense_t dl_autoneg;
uint32_t dl_mtu;
uint64_t dl_value1;
uint64_t dl_value2;
uint64_t dl_value3;
uint32_t dl_reserved1[2];
uint32_t dl_reserved2[2];
} dl_hp_get_drv_param_ioctl_t;
typedef enum dl_hp_drv_param_req_type {
DL_HP_DRV_SPEED = 0x1, // dl_speed value is valid.
DL_HP_DRV_DUPLEX = 0x2, // dl_duplex value is valid.
DL_HP_DRV_AUTONEG = 0x4, // dl_autoneg value is valid.
DL_HP_DRV_MTU = 0x8, // dl_mtu value is valid.
DL_HP_DRV_RESET_MTU = 0x10, // Resets the MTU.
DL_HP_VALUE1 = 0x20, // dl_value1 is valid.
DL_HP_VALUE2 = 0x40, // dl_value2 is valid.
DL_HP_VALUE3 = 0x80, // dl_value3 is valid.
DL_HP_RESERVED1 = 0x100, // dl_reserved1[0] is valid.
DL_HP_RESERVED2 = 0x200, // dl_reserved1[1] is valid.
DL_HP_RESERVED3 = 0x400, // DL_HP_RESERVED3 is reserved by DLPI.
DL_HP_RESERVED4 = 0x800, // DL_HP_RESERVED4 is reserved by DLPI.
DL_HP_SERIALIZE = 0x40000000 // Requests DLPI to serialize the request.
} dl_hp_drv_param_req_type_t;
//////////////////////////////////////////////////////////////////////
// dl_hp_duplex_mode_t Enumeration Constant Value //
//////////////////////////////////////////////////////////////////////
typedef enum dl_hp_duplex_mode {
DL_HP_HALF_DUPLEX = 0x1,
DL_HP_FULL_DUPLEX =0x2
} dl_hp_duplex_mode_t;
//////////////////////////////////////////////////////////////////////
// dl_hp_autoneg_sense_t Enumeration Constant Value //
//////////////////////////////////////////////////////////////////////
typedef enum dl_hp_autoneg_sense {
DL_HP_AUTONEG_SENSE_ON = 0x1,
DL_HP_AUTONEG_SENSE_OFF = 0x2
} dl_hp_autoneg_sense_t;
#define AREA_SIZE 1000 /* Area size */
char buf_ctl[AREA_SIZE]; /* for control messages */
struct strbuf ctlbuf = {
AREA_SIZE, /* maxlen = AREA_SIZE */
0, /* len gets filled in for each message */
buf_ctl /* buf = control area */
};
... REST OF UNMODIFIED CODE FROM SAMPLE PROGRAM HERE ...
Question 3: Do I have this correct so far and what are the pieces that are missing?
Thanks in Advance,
Phil.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-31-2004 06:16 PM
тАО01-31-2004 06:16 PM
Re: DLPI Programmer's Guide Question
Thanks for your using this document and giving your valuable feedback. I shall pass your query to the DLPI documentation team. You will hear from them shortly.
Thanks for your patience.
Regards,
Hemanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-04-2004 02:58 AM
тАО02-04-2004 02:58 AM
Re: DLPI Programmer's Guide Question
Thanks a lot for using the DLPI Programmer's Guide and providing valuable feedback!
I visited the link of the document you are referring to, and I found that the document includes the pertinent information.
Could you please elaborate on "What are the correct definitions for these calls?"
Please note that you should use these calls between drivers and driver-specific applications, not in any general application. It may not work if the application does not know how the driver works.
If you want to use the specified IOCTLs, make sure to use dlpi_ext.h in your program.
We'll surely provide more specific and accurate answer after we hear from you.
Thanks again for your feedback! This will definitely help us address the requirements of our users.
Best regards,
Akash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-04-2004 03:18 AM
тАО02-04-2004 03:18 AM
Re: DLPI Programmer's Guide Question
Here is what I would like to accomplish. First produce a working example of the ioctl routine that is just suppose to display the MTU. Like the example indicates. Secondly, expand the example to facilitate getting the other components like DL_HP_DRV_SPEED, DL_HP_DRV_DUPLEX, and DL_HP_DRV_AUTONEG.
It sould be simple and I feel that the example should compile usinng HP's softbench (i.e. aCC) but important pieces are missing. This is why I posted what I think the document is indicating when the structs, typedefs, enums, and defines are discussed. I have no real idea because I do not have any of the mentioned data structures and defines in my dlpi.h and dlpi_ext.h.
In short, I need a real working example that allows me to obtain the information that I am seeking in this message post.
Thanks in advance for any and all assistance,
Phil.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2004 12:31 AM
тАО02-09-2004 12:31 AM
Re: DLPI Programmer's Guide Question
As we were facing network problems, we couldn't respond to your query earlier. We apologize for the delay.
I think you are referring to the 11.23 DLPI programmer's guide and trying to compile a program for 11.11/11.00 with new (11.23) IOCTLs, which are not a part of these releases.
You'll not be able to accomplish the specified task, as we do not export IOCTLs to set/get driver parameters in 11.00/11.11.
Hope this answers your question. If you need any other information, do let us know.
Best regards,
Akash