1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2001, 2002 Cluster File Systems, Inc.
6 * This file is part of Portals, http://www.sf.net/projects/lustre/
8 * Portals is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU General Public
10 * License as published by the Free Software Foundation.
12 * Portals is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Portals; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * header for libptlctl.a
26 #define PORTALS_DEV_ID 0
27 #define PORTALS_DEV_PATH "/dev/portals"
29 #define OBD_DEV_PATH "/dev/obd"
31 int ptl_name2nal(char *str);
32 int ptl_parse_ipaddr (__u32 *ipaddrp, char *str);
33 int ptl_parse_nid (ptl_nid_t *nidp, char *str);
34 char * ptl_nid2str (char *buffer, ptl_nid_t nid);
36 int ptl_initialize(int argc, char **argv);
37 int jt_ptl_network(int argc, char **argv);
38 int jt_ptl_print_autoconnects (int argc, char **argv);
39 int jt_ptl_add_autoconnect (int argc, char **argv);
40 int jt_ptl_del_autoconnect (int argc, char **argv);
41 int jt_ptl_print_connections (int argc, char **argv);
42 int jt_ptl_connect(int argc, char **argv);
43 int jt_ptl_disconnect(int argc, char **argv);
44 int jt_ptl_push_connection(int argc, char **argv);
45 int jt_ptl_print_active_txs(int argc, char **argv);
46 int jt_ptl_ping(int argc, char **argv);
47 int jt_ptl_shownid(int argc, char **argv);
48 int jt_ptl_mynid(int argc, char **argv);
49 int jt_ptl_add_uuid(int argc, char **argv);
50 int jt_ptl_add_uuid_old(int argc, char **argv); /* backwards compatibility */
51 int jt_ptl_close_uuid(int argc, char **argv);
52 int jt_ptl_del_uuid(int argc, char **argv);
53 int jt_ptl_rxmem (int argc, char **argv);
54 int jt_ptl_txmem (int argc, char **argv);
55 int jt_ptl_nagle (int argc, char **argv);
56 int jt_ptl_add_route (int argc, char **argv);
57 int jt_ptl_del_route (int argc, char **argv);
58 int jt_ptl_notify_router (int argc, char **argv);
59 int jt_ptl_print_routes (int argc, char **argv);
60 int jt_ptl_fail_nid (int argc, char **argv);
61 int jt_ptl_lwt(int argc, char **argv);
62 int jt_ptl_memhog(int argc, char **argv);
64 int dbg_initialize(int argc, char **argv);
65 int jt_dbg_filter(int argc, char **argv);
66 int jt_dbg_show(int argc, char **argv);
67 int jt_dbg_list(int argc, char **argv);
68 int jt_dbg_debug_kernel(int argc, char **argv);
69 int jt_dbg_debug_daemon(int argc, char **argv);
70 int jt_dbg_debug_file(int argc, char **argv);
71 int jt_dbg_clear_debug_buf(int argc, char **argv);
72 int jt_dbg_mark_debug_buf(int argc, char **argv);
73 int jt_dbg_modules(int argc, char **argv);
74 int jt_dbg_panic(int argc, char **argv);
76 int ptl_set_cfg_record_cb(cfg_record_cb_t cb);
79 typedef int (ioc_handler_t)(int dev_id, int opc, void *buf);
80 void set_ioc_handler(ioc_handler_t *handler);
81 int register_ioc_dev(int dev_id, const char * dev_name);
82 void unregister_ioc_dev(int dev_id);
83 int set_ioctl_dump(char * file);
84 int l_ioctl(int dev_id, int opc, void *buf);
85 int parse_dump(char * dump_file, int (*ioc_func)(int dev_id, int opc, void *));
86 int jt_ioc_dump(int argc, char **argv);