1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
6 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 only,
10 * as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License version 2 for more details (a copy is included
16 * in the LICENSE file that accompanied this code).
18 * You should have received a copy of the GNU General Public License
19 * version 2 along with this program; If not, see
20 * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
22 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
23 * CA 95054 USA or visit www.sun.com if you need additional information or
29 * Copyright 2008 Sun Microsystems, Inc. All rights reserved
30 * Use is subject to license terms.
33 * This file is part of Lustre, http://www.lustre.org/
34 * Lustre is a trademark of Sun Microsystems, Inc.
37 #ifndef __LNET_API_H__
38 #define __LNET_API_H__
40 #include <lnet/types.h>
45 int LNetNIInit(lnet_pid_t requested_pid);
48 int LNetGetId(unsigned int index, lnet_process_id_t *id);
49 int LNetDist(lnet_nid_t nid, lnet_nid_t *srcnid, __u32 *order);
50 int LNetCtl(unsigned int cmd, void *arg);
51 void LNetSnprintHandle (char *str, int str_len, lnet_handle_any_t handle);
56 int LNetSetLazyPortal(int portal);
57 int LNetClearLazyPortal(int portal);
62 int LNetMEAttach(unsigned int portal,
63 lnet_process_id_t match_id_in,
66 lnet_unlink_t unlink_in,
67 lnet_ins_pos_t pos_in,
68 lnet_handle_me_t *handle_out);
70 int LNetMEInsert(lnet_handle_me_t current_in,
71 lnet_process_id_t match_id_in,
74 lnet_unlink_t unlink_in,
75 lnet_ins_pos_t position_in,
76 lnet_handle_me_t *handle_out);
78 int LNetMEUnlink(lnet_handle_me_t current_in);
83 int LNetMDAttach(lnet_handle_me_t current_in,
85 lnet_unlink_t unlink_in,
86 lnet_handle_md_t *handle_out);
88 int LNetMDBind(lnet_md_t md_in,
89 lnet_unlink_t unlink_in,
90 lnet_handle_md_t *handle_out);
92 int LNetMDUnlink(lnet_handle_md_t md_in);
97 int LNetEQAlloc(unsigned int count_in,
98 lnet_eq_handler_t handler,
99 lnet_handle_eq_t *handle_out);
101 int LNetEQFree(lnet_handle_eq_t eventq_in);
103 int LNetEQGet(lnet_handle_eq_t eventq_in,
104 lnet_event_t *event_out);
107 int LNetEQWait(lnet_handle_eq_t eventq_in,
108 lnet_event_t *event_out);
110 int LNetEQPoll(lnet_handle_eq_t *eventqs_in,
113 lnet_event_t *event_out,
119 int LNetPut(lnet_nid_t self,
120 lnet_handle_md_t md_in,
121 lnet_ack_req_t ack_req_in,
122 lnet_process_id_t target_in,
123 unsigned int portal_in,
125 unsigned int offset_in,
128 int LNetGet(lnet_nid_t self,
129 lnet_handle_md_t md_in,
130 lnet_process_id_t target_in,
131 unsigned int portal_in,
133 unsigned int offset_in);
136 int LNetSetAsync(lnet_process_id_t id, int nasync);
139 /* Temporary workaround to allow uOSS and test programs force server
140 * mode in userspace. See comments near ln_server_mode_flag in
141 * lnet/lib-types.h */
143 void lnet_server_mode();