Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

gm_open.c File Reference

#include "gm_call_trace.h"
#include "gm_compiler.h"
#include "gm_debug.h"
#include "gm_debug_open.h"
#include "gm_internal.h"
#include "gm_internal_funcs.h"
#include "gm_enable_ethernet.h"
#include "gm_enable_security.h"
#include "gm_enable_trace.h"
#include "gm_ptr_hash.h"

Functions

GM_ENTRY_POINT gm_status_t gm_open (gm_port_t **port_p, unsigned unit, unsigned port_id, const char *client_type, enum gm_api_version api_version)

Detailed Description

The file containing the GM API function gm_open().


Function Documentation

GM_ENTRY_POINT gm_status_t gm_open gm_port_t **    port_p,
unsigned    unit,
unsigned    port_id,
const char *    client_type,
enum gm_api_version    api_version
 

gm_open() opens a GM port port_p for LANai interface unit, a pointer to the port's state at *port_p. The pointer must be passed to all subsequent functions that operate on the opened port. port_id is a null-terminated ASCII string that is used to identify the port client for debugging (and potentially other) purposes; pass in the name of your program. Note that unit and port numbers start at 0, and that ports 0 (internal use) and 1 (mapper) and 3 (ethernet emulation) are reserved, so clients should use port 2 and ports 4-7.

gm_open() is to be called by clients other than the daemon and mapper.

Return values:
GM_SUCCESS  Operation completed successfully.
GM_INVALID_PARAMETER  Invalid parameter passed.
GM_BUSY  Could not open device.
GM_NO_SUCH_DEVICE  port_id > GM_NUM_PORTS - 1.
GM_INCOMPATIBLE_LIB_AND_DRIVER  The GM user library linked with this program may not be compatible with the installed driver.
GM_OUT_OF_MEMORY  Could not allocate storage for user port.
Parameters:
port_p  (IN) Pointer to the handle of the GM port.
unit  (IN) The device for the Myrinet interface. = 0 if device is myri0.
port_id  (OUT) The id of the GM port that is opened. = 2, 4, 5, 6, or 7 (Ports 0, 1, and 3 are for privileged use only.)
client_type  (IN) Unused.
api_version  (IN) GM_API_VERSION = GM_API_VERSION as defined in gm.h
See also:
gm_close gm_init gm_abort gm_finalize gm_exit
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)


Generated on Mon Nov 3 15:39:26 2003 for GM by doxygen1.2.15