Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Port Functions

Functions

ocs_hal_rtn_e ocs_hal_portal_set_mac (ocs_hal_t *hal, uint8_t *mac_address, portal_cb_t portal_cb, void *ul_arg)
 Set the MAC address on the portal. More...
 
ocs_hal_rtn_e ocs_hal_portal_set_mtu (ocs_hal_t *hal, uint8_t is_jumbo, portal_cb_t portal_cb, void *ul_arg)
 Enable Jumbo frame support on the portal. More...
 
ocs_hal_portal_t ocs_hal_portal_get_default (ocs_hal_t *hal)
 Return the default portal. More...
 
ocs_hal_rtn_e ocs_hal_portal_create (ocs_hal_t *hal, unsigned int vlan_tag, portal_cb_t portal_cb, void *ul_arg)
 Create a new VLAN interface handle. More...
 
ocs_hal_rtn_e ocs_hal_portal_delete (ocs_hal_t *hal, ocs_hal_portal_t portal, portal_cb_t portal_cb, void *ul_arg)
 Delete a VLAN interface handle. More...
 
ocs_hal_rtn_e ocs_hal_portal_set_route_table (ocs_hal_t *hal, ocs_hal_ip_address_subnet_t *hal_ipsub, ocs_hal_ip_address_t *hal_gateway, int32_t add, portal_cb_t portal_cb, void *ul_arg)
 Add/Remove an entry to routing table. More...
 
ocs_hal_rtn_e ocs_hal_portal_get_route_table (ocs_hal_t *hal, portal_cb_t portal_cb, void *ul_arg)
 Read routing table. More...
 
ocs_hal_rtn_e ocs_hal_portal_ip_add (ocs_hal_t *hal, ocs_hal_portal_t portal, ocs_hal_ip_address_subnet_t *ipaddr, portal_cb_t portal_cb, void *ul_arg)
 Add an IP address to an interface. More...
 
ocs_hal_rtn_e ocs_hal_portal_ip_remove (ocs_hal_t *hal, ocs_hal_portal_t portal, ocs_hal_ip_address_subnet_t *ipaddr, portal_cb_t portal_cb, void *ul_arg)
 Removes an IP address from an interface. More...
 
ocs_hal_rtn_e ocs_hal_portal_ip_get (ocs_hal_t *hal, ocs_hal_portal_t portal, ocs_hal_ip_type_e ip_type, portal_cb_t portal_cb, void *ul_arg)
 Retrieves the IP addresses on an interface. More...
 
ocs_hal_rtn_e ocs_hal_portal_gateway_get (ocs_hal_t *hal, ocs_hal_ip_type_e ip_type, portal_cb_t portal_cb, void *ul_arg)
 Retrieves the default gateway on an interface. More...
 
ocs_hal_rtn_e ocs_hal_portal_gateway_add (ocs_hal_t *hal, ocs_hal_ip_address_t *gateway, portal_cb_t portal_cb, void *ul_arg)
 adds the default gateway on an interface. More...
 
ocs_hal_rtn_e ocs_hal_portal_gateway_remove (ocs_hal_t *hal, ocs_hal_ip_address_t *gateway, portal_cb_t portal_cb, void *ul_arg)
 removes a default gateway on an interface. More...
 
ocs_hal_rtn_e ocs_hal_portal_listen_start (ocs_hal_t *hal, ocs_hal_ip_address_t *ipaddr, uint32_t tcp_port, portal_cb_t portal_cb, void *ul_arg)
 Starts listening on a TCP port. More...
 
ocs_hal_rtn_e ocs_hal_portal_listen_stop (ocs_hal_t *hal, ocs_hal_ip_address_t *ipaddr, uint32_t tcp_port, portal_cb_t portal_cb, void *ul_arg)
 Stops listening on a TCP port. More...
 
ocs_hal_rtn_e ocs_hal_portal_isns_discover (ocs_hal_t *hal, ocs_hal_portal_t portal, portal_cb_t portal_cb, void *ul_arg)
 Discovers iSNS servers via DHCP. More...
 
ocs_hal_rtn_e ocs_hal_portal_isns_send_packet (ocs_hal_t *hal, ocs_hal_ip_address_t *isns_server, uint32_t tcp_port, void *packet, uint32_t pkt_len, portal_cb_t portal_cb, void *ul_arg)
 Sends an iSNS packet to the requested server. More...
 
ocs_hal_rtn_e ocs_hal_portal_esi_listen_start (ocs_hal_t *hal, ocs_hal_ip_address_t *ipaddr, uint32_t tcp_port, portal_cb_t portal_cb, void *ul_arg)
 Starts listening for iSNS ESI messages on a TCP port. More...
 
ocs_hal_rtn_e ocs_hal_portal_esi_listen_stop (ocs_hal_t *hal, ocs_hal_ip_address_t *ipaddr, uint32_t tcp_port, portal_cb_t portal_cb, void *ul_arg)
 Stops listening on an iSNS ESI TCP port. More...
 

Function Details

ocs_hal_rtn_e ocs_hal_portal_create ( ocs_hal_t *  hal,
unsigned int  vlan_tag,
portal_cb_t  portal_cb,
void *  ul_arg 
)

Create a new VLAN interface handle.

Parameters
halHardware context.
vlan_tagThe vlan and priority.
portal_cbPointer to the function to call when the operation completes.
ul_argPointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 3263 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_delete ( ocs_hal_t *  hal,
ocs_hal_portal_t  portal,
portal_cb_t  portal_cb,
void *  ul_arg 
)

Delete a VLAN interface handle.

Parameters
halHardware context.
portalPortal handle to remove.
portal_cbPointer to the function to call when the operation completes.
ul_argPointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 3307 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_esi_listen_start ( ocs_hal_t *  hal,
ocs_hal_ip_address_t *  ipaddr,
uint32_t  tcp_port,
portal_cb_t  portal_cb,
void *  ul_arg 
)

Starts listening for iSNS ESI messages on a TCP port.

Parameters
halHardware context.
ipaddrIP address start listening.
tcp_portTCP port number.
portal_cbPointer to the function to call when the operation completes.
ul_argPointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 4380 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_esi_listen_stop ( ocs_hal_t *  hal,
ocs_hal_ip_address_t *  ipaddr,
uint32_t  tcp_port,
portal_cb_t  portal_cb,
void *  ul_arg 
)

Stops listening on an iSNS ESI TCP port.

Parameters
halHardware context.
ipaddrIP address to stop listening to.
tcp_portTCP port number.
portal_cbPointer to the function to call when the operation completes.
ul_argPointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 4425 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_gateway_add ( ocs_hal_t *  hal,
ocs_hal_ip_address_t *  gateway,
portal_cb_t  portal_cb,
void *  ul_arg 
)

adds the default gateway on an interface.

Parameters
halHardware context.
gatewaythe IP gateway to add
portal_cbpointer to the function to call when the operation completes
ul_argpointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 4057 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_gateway_get ( ocs_hal_t *  hal,
ocs_hal_ip_type_e  ip_type,
portal_cb_t  portal_cb,
void *  ul_arg 
)

Retrieves the default gateway on an interface.

Parameters
halHardware context.
ip_typethe type of IP interface to retrieve
portal_cbpointer to the function to call when the operation completes
ul_argpointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 4012 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_gateway_remove ( ocs_hal_t *  hal,
ocs_hal_ip_address_t *  gateway,
portal_cb_t  portal_cb,
void *  ul_arg 
)

removes a default gateway on an interface.

Parameters
halHardware context.
gatewaythe IP gateway to remove
portal_cbpointer to the function to call when the operation completes
ul_argpointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 4101 of file ocs_hal.c.

ocs_hal_portal_t ocs_hal_portal_get_default ( ocs_hal_t *  hal)

Return the default portal.

Parameters
halHardware context.
Returns
Returns a pointer to the default portal.

Definition at line 3215 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_get_route_table ( ocs_hal_t *  hal,
portal_cb_t  portal_cb,
void *  ul_arg 
)

Read routing table.

Parameters
halHardware context.
portal_cbpointer to the function to call when the operation completes
ul_argpointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 3661 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_ip_add ( ocs_hal_t *  hal,
ocs_hal_portal_t  portal,
ocs_hal_ip_address_subnet_t *  ipaddr,
portal_cb_t  portal_cb,
void *  ul_arg 
)

Add an IP address to an interface.

Parameters
halHardware context.
portalthe portal handle
ipaddrthe IP address to add
portal_cbpointer to the function to call when the operation completes
ul_argpointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 3727 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_ip_get ( ocs_hal_t *  hal,
ocs_hal_portal_t  portal,
ocs_hal_ip_type_e  ip_type,
portal_cb_t  portal_cb,
void *  ul_arg 
)

Retrieves the IP addresses on an interface.

Parameters
halHardware context.
portalthe portal handle
ip_typethe type of IP addresses to retrieve
portal_cbpointer to the function to call when the operation completes
ul_argpointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 3925 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_ip_remove ( ocs_hal_t *  hal,
ocs_hal_portal_t  portal,
ocs_hal_ip_address_subnet_t *  ipaddr,
portal_cb_t  portal_cb,
void *  ul_arg 
)

Removes an IP address from an interface.

Parameters
halHardware context.
portalthe portal handle
ipaddrthe IP address to remove
portal_cbpointer to the function to call when the operation completes
ul_argpointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 3802 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_isns_discover ( ocs_hal_t *  hal,
ocs_hal_portal_t  portal,
portal_cb_t  portal_cb,
void *  ul_arg 
)

Discovers iSNS servers via DHCP.

Parameters
halHardware context.
portalthe portal handle
portal_cbpointer to the function to call when the operation completes
ul_argpointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 4245 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_isns_send_packet ( ocs_hal_t *  hal,
ocs_hal_ip_address_t *  isns_server,
uint32_t  tcp_port,
void *  packet,
uint32_t  pkt_len,
portal_cb_t  portal_cb,
void *  ul_arg 
)

Sends an iSNS packet to the requested server.

Parameters
halHardware context.
isns_serverthe IP of the iSNS server
tcp_portThe TCP port number
packetvirtual memory of the packet to send
pkt_lenthe length of the packet in bytes
portal_cbpointer to the function to call when the operation completes
ul_argpointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 4324 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_listen_start ( ocs_hal_t *  hal,
ocs_hal_ip_address_t *  ipaddr,
uint32_t  tcp_port,
portal_cb_t  portal_cb,
void *  ul_arg 
)

Starts listening on a TCP port.

Parameters
halHardware context.
ipaddrthe IP address start listening
tcp_portThe TCP port number
portal_cbpointer to the function to call when the operation completes
ul_argpointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 4147 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_listen_stop ( ocs_hal_t *  hal,
ocs_hal_ip_address_t *  ipaddr,
uint32_t  tcp_port,
portal_cb_t  portal_cb,
void *  ul_arg 
)

Stops listening on a TCP port.

Parameters
halHardware context.
ipaddrthe IP address stop listening
tcp_portThe TCP port number
portal_cbpointer to the function to call when the operation completes
ul_argpointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 4201 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_set_mac ( ocs_hal_t *  hal,
uint8_t *  mac_address,
portal_cb_t  portal_cb,
void *  ul_arg 
)

Set the MAC address on the portal.

Parameters
halHardware context.
mac_addressMAC address to set.
portal_cbPointer to the function to call when the operation completes.
ul_argPointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 3122 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_set_mtu ( ocs_hal_t *  hal,
uint8_t  is_jumbo,
portal_cb_t  portal_cb,
void *  ul_arg 
)

Enable Jumbo frame support on the portal.

Parameters
halHardware context.
is_jumboIf TRUE, then jumbo frames are enabled, otherwise the standard Ethernet frame size is set.
portal_cbPointer to the function to call when the operation completes.
ul_argPointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 3171 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_portal_set_route_table ( ocs_hal_t *  hal,
ocs_hal_ip_address_subnet_t *  hal_ipsub,
ocs_hal_ip_address_t *  hal_gateway,
int32_t  add,
portal_cb_t  portal_cb,
void *  ul_arg 
)

Add/Remove an entry to routing table.

Parameters
halHardware context.
ipsubthe IP address and subnet mask to add/remove
gatewaythe gateway address to add/remove
adda non-zero to add, otherwise to remove
portal_cbpointer to the function to call when the operation completes
ul_argpointer to the argument to pass back to portal_cb().
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 3593 of file ocs_hal.c.