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 #include <portals/types.h>
27 #include <linux/kp30.h>
28 #include <linux/libcfs.h>
30 #define PORTALS_DEV_ID 0
31 #define PORTALS_DEV_PATH "/dev/portals"
33 #define OBD_DEV_PATH "/dev/obd"
35 #define SMFS_DEV_PATH "/dev/snapdev"
37 int ptl_name2nal(char *str);
38 int ptl_parse_ipaddr (__u32 *ipaddrp, char *str);
39 int ptl_parse_nid (ptl_nid_t *nidp, char *str);
40 char * ptl_nid2str (char *buffer, ptl_nid_t nid);
42 int ptl_initialize(int argc, char **argv);
43 int jt_ptl_network(int argc, char **argv);
44 int jt_ptl_print_interfaces(int argc, char **argv);
45 int jt_ptl_add_interface(int argc, char **argv);
46 int jt_ptl_del_interface(int argc, char **argv);
47 int jt_ptl_print_peers (int argc, char **argv);
48 int jt_ptl_add_peer (int argc, char **argv);
49 int jt_ptl_del_peer (int argc, char **argv);
50 int jt_ptl_print_connections (int argc, char **argv);
51 int jt_ptl_connect(int argc, char **argv);
52 int jt_ptl_disconnect(int argc, char **argv);
53 int jt_ptl_push_connection(int argc, char **argv);
54 int jt_ptl_print_active_txs(int argc, char **argv);
55 int jt_ptl_ping(int argc, char **argv);
56 int jt_ptl_shownid(int argc, char **argv);
57 int jt_ptl_mynid(int argc, char **argv);
58 int jt_ptl_add_uuid(int argc, char **argv);
59 int jt_ptl_add_uuid_old(int argc, char **argv); /* backwards compatibility */
60 int jt_ptl_close_uuid(int argc, char **argv);
61 int jt_ptl_del_uuid(int argc, char **argv);
62 int jt_ptl_add_route (int argc, char **argv);
63 int jt_ptl_del_route (int argc, char **argv);
64 int jt_ptl_notify_router (int argc, char **argv);
65 int jt_ptl_print_routes (int argc, char **argv);
66 int jt_ptl_fail_nid (int argc, char **argv);
67 int jt_ptl_lwt(int argc, char **argv);
68 int jt_ptl_memhog(int argc, char **argv);
70 int dbg_initialize(int argc, char **argv);
71 int jt_dbg_filter(int argc, char **argv);
72 int jt_dbg_show(int argc, char **argv);
73 int jt_dbg_list(int argc, char **argv);
74 int jt_dbg_debug_kernel(int argc, char **argv);
75 int jt_dbg_debug_daemon(int argc, char **argv);
76 int jt_dbg_debug_file(int argc, char **argv);
77 int jt_dbg_clear_debug_buf(int argc, char **argv);
78 int jt_dbg_mark_debug_buf(int argc, char **argv);
79 int jt_dbg_modules(int argc, char **argv);
80 int jt_dbg_panic(int argc, char **argv);
82 int ptl_set_cfg_record_cb(cfg_record_cb_t cb);
85 typedef int (ioc_handler_t)(int dev_id, unsigned int opc, void *buf);
86 void set_ioc_handler(ioc_handler_t *handler);
87 int register_ioc_dev(int dev_id, const char * dev_name);
88 void unregister_ioc_dev(int dev_id);
89 int set_ioctl_dump(char * file);
90 int l_ioctl(int dev_id, unsigned int opc, void *buf);
91 int parse_dump(char * dump_file, ioc_handler_t ioc_func);
92 int jt_ioc_dump(int argc, char **argv);
93 extern char *dump_filename;
94 int dump(int dev_id, unsigned int opc, void *buf);