HBA_GetPortAttributesByWWN(3hbaapi) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

HBA_GetPortAttributesByWWN(3hbaapi)

HB...s(3HBAAPCIo)mmon Fibre Channel HBA Information Library FunctioHnBs...s(3HBAAPI)

NAME
       HBA_GetAdapterPortAttributes, HBA_GetDiscoveredPortAttributes, HBA_Get‐
       PortAttributesByWWN - retrieve Fibre Channel port attributes for a spe‐
       cific device

SYNOPSIS
       cc [ flag... ] file... -lHBAAPI [ library... ]
       #include <hbaapi.h>

       HBA_STATUS HBA_GetAdapterPortAttributes(HBA_HANDLE handle,
            HBA_UINT32 portindex, HBA_PORTATTRIBUTES *portattributes);


       HBA_STATUS HBA_GetDiscoveredPortAttributes(HBA_HANDLE handle,
            HBA_UINT32 portindex, HBA_UINT32 discoveredportindex,
            HBA_PORTATTRIBUTES *portattributes);


       HBA_STATUS HBA_GetPortAttributesByWWN(HBA_HANDLE handle,
            HBA_WWN PortWWN, HBA_PORTATTRIBUTES *portattributes);

PARAMETERS
       handle                 an    open   handle   returned   from   HBA_Ope‐
                              nAdapter(3HBAAPI)


       portindex              the index of a specific port on the HBA  as  re‐
                              turned   by   a  call  to  HBA_GetAdapterAttrib‐
                              utes(3HBAAPI).  The  maximum   value   specified
                              should be (HBA_ADAPTERATTRIBUTES.NumberOfPorts -
                              1).


       portattributes         a  pointer  to  an HBA_PORTATTRIBUTES structure.
                              Upon successful completion, this structure  con‐
                              tains the specified port attributes.


       discoveredportindex    the  index  of a specific discovered port on the
                              HBA  as  returned  by  HBA_GetAdapterPortAttrib‐
                              utes(3HBAAPI).   The   maximum  value  specified
                              should  be   (HBA_PORTATTRIBUTES.NumberOfDiscov‐
                              eredPorts - 1).


       PortWWN                the  port  WWN  of the device for which port at‐
                              tributes are retrieved.


DESCRIPTION
       The HBA_GetAdapterPortAttributes() function retrieves  Port  Attributes
       for a specific port on the HBA.


       The  HBA_GetDiscoveredPortAttributes()  function retrieves Port Attrib‐
       utes for a specific discovered device connected to the HBA.


       The HBA_GetPortAttributesByWWN() function retrieves Port Attributes for
       a specific device based on the PortWWN argument.

RETURN VALUES
       Upon successful completion, HBA_STATUS_OK is  returned.  Otherwise,  an
       error  value  is  returned  from  the  underlying VSL and the values in
       hbaattributes are undefined.

ERRORS
       See libhbaapi(3LIB) for general error status values.

EXAMPLES
       Example 1 Retrieve the port attributes for each port on the HBA.



       The following example retrieves the port attributes for  each  port  on
       the HBA.


         for (hbaPort = 0; hbaPort < hbaAttrs.NumberOfPorts; hbaPort++) {
             if ((status = HBA_GetAdapterPortAttributes(handle,
                     hbaPort, &hbaPortAttrs)) != HBA_STATUS_OK) {
                 fprintf(stderr, "Unable to get adapter port %d "
                     "attributes for HBA %d with name \"%s\".\n",
                     hbaPort, hbaCount, adaptername);
                 HBA_CloseAdapter(handle);
                 continue;
             }
             memcpy(&wwn, hbaPortAttrs.PortWWN.wwn, sizeof (wwn));
             printf(" Port %d: WWN=%016llx\n", hbaPort, wwn);

             /* ... */
         }




       Example  2 Retrieve the discovered port target attributes for each dis‐
       covered target port on the HBA.



       The following example retrieves the discovered port  target  attributes
       for each discovered target port on the HBA.


         for (discPort = 0;
                 discPort < hbaPortAttrs.NumberofDiscoveredPorts;
                 discPort++) {
             if ((status = HBA_GetDiscoveredPortAttributes(
                     handle, hbaPort, discPort,
                     &discPortAttrs)) != HBA_STATUS_OK) {
                 fprintf(stderr, "Unable to get "
                     "discovered port %d attributes for "
                     "HBA %d with name \"%s\".\n",
                     discPort, hbaCount, adaptername);
                 continue;
             }
             memcpy(&wwn, discPortAttrs.PortWWN.wwn,
                 sizeof (wwn));
             printf("  Discovered Port %d: WWN=%016llx\n",
                 discPort, wwn);

             /* ... */
         }


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Interface StabilityCommitted _ T{ Standard: FC-HBA Ver‐
       sion 4 (API version 2) T} _ MT-LevelSafe _ StandardFC-MI 1.92 (API ver‐
       sion 1)


SEE ALSO
       HBA_GetAdapterPortAttributes(3HBAAPI), HBA_OpenAdapter(3HBAAPI),  libh‐
       baapi(3LIB), attributes(7)


       T11 FC-MI Specification

Oracle Solaris 11.4               1 Sep 2003                   HB...s(3HBAAPI)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3