rmcp.i 5.6 KB
Newer Older
1 2
/*
 * Copyright (c) 2007 University of Utah and the Flux Group.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
 * 
 * {{{EMULAB-LICENSE
 * 
 * This file is part of the Emulab network testbed software.
 * 
 * This file is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or (at
 * your option) any later version.
 * 
 * This file is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public
 * License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this file.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * }}}
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
 *
 */
%module rmcp
%{
#include "rmcp.h"
%}


%rename swr_fill_str rmcp_setstrbuf;

/**
 * Since I couldn't figure out how to pass a pointer-to-pointer-to-struct,
 * and then retrieve a meaningful value in perl, I just flip the names 'round
 * so that things make sense to people reading the C headers.
 */
%rename rmcp_asf_ping c_rmcp_asf_ping;
%rename swr_rmcp_asf_ping rmcp_asf_ping;

%rename rmcp_asf_get_capabilities c_rmcp_asf_get_capabilities;
%rename swr_rmcp_asf_get_capabilities rmcp_asf_get_capabilities;

%rename rmcp_asf_get_sysstate c_rmcp_asf_get_sysstate;
%rename swr_rmcp_asf_get_sysstate rmcp_asf_get_sysstate;

/**
 * No sane person would want to use these functions via swig.
 * If that changes, we'd have to do some funky stuff to deal with all the 
 * "nonstandard" standard types used in rmcp.(h|c).
 */
%ignore rmcp_raw_read;
%ignore rmcp_recv_msg_and_ack;
%ignore rmcp_send_msg;
%ignore rmcp_send_msg_wait_ack;
%ignore rmcp_marshall;
%ignore rmcp_unmarshall;
%ignore rmcp_build_ack;
%ignore rmcp_build_asf_msg;
%ignore rmcp_free_asf_msg;
%ignore rmcp_fill_asf_ping;
%ignore rmcp_fill_asf_capabilities_request;
%ignore rmcp_fill_asf_sysstate_request;
%ignore rmcp_decode_asf_supported;
%ignore rmcp_print_asf_supported;
%ignore rmcp_decode_asf_capabilities;
%ignore rmcp_print_asf_capabilities;
%ignore rmcp_decode_asf_sysstate;
%ignore rmcp_print_asf_sysstate;

/**
 * Lots of these identifiers and types people cannot get to since we excluded
 * the previous function list.  So, kill them too.
 */
%ignore RMCP_IANA_ENT_ID;
%ignore RMCP_VERSION_1_0;
%ignore RMCP_NOACK_SEQNO;
%ignore RMCP_ACK_CLASS_BIT;
%ignore RMCP_RSP_NXT_HDR;
%ignore RMCP_SID_BYPASS;
%ignore RMCP_ERR_MAX;
%ignore rmcp_flag_b;
%ignore rmcp_flag;
%ignore RMCP_CLASS_ASF;
%ignore RMCP_CLASS_IPMI;
%ignore rmcp_hdr;
%ignore RMCP_ASF_TYPE_RESET;
%ignore RMCP_ASF_TYPE_POWER_UP;
%ignore RMCP_ASF_TYPE_POWER_DOWN;
%ignore RMCP_ASF_TYPE_POWER_CYCLE_RESET;
%ignore RMCP_ASF_TYPE_PRESENCE_PONG;
%ignore RMCP_ASF_TYPE_CAPABILITIES_RESPONSE;
%ignore RMCP_ASF_TYPE_SYSSTATE_RESPONSE;
%ignore RMCP_ASF_TYPE_OPEN_SESSION_RESPONSE;
%ignore RMCP_ASF_TYPE_CLOSE_SESSION_RESPONSE;
%ignore RMCP_ASF_TYPE_PRESENCE_PING;
%ignore RMCP_ASF_TYPE_CAPABILITIES_REQUEST;
%ignore RMCP_ASF_TYPE_SYSSTATE_REQUEST;
%ignore RMCP_ASF_TYPE_OPEN_SESSION_REQUEST;
%ignore RMCP_ASF_TYPE_CLOSE_SESSION_REQUEST;
%ignore RMCP_ASF_TYPE_RAKP_MSG_1;
%ignore RMCP_ASF_TYPE_RAKP_MSG_2;
%ignore RMCP_ASF_TYPE_RAKP_MSG_3;
%ignore rmcp_asf_data;
%ignore rmcp_rsp_hdr;
%ignore rmcp_rsp_tlr;
%ignore rmcp_msg;
%ignore RMCP_SUPPORTED_IPMI;
%ignore RMCP_SUPPORTED_ASF_1;
%ignore RMCP_SUPPORTED_SECURE;
%ignore RMCP_ASF_COM_CD;
%ignore RMCP_ASF_COM_DIAG;
%ignore RMCP_ASF_COM_HDD_SAFE;
%ignore RMCP_ASF_COM_HDD;
%ignore RMCP_ASF_COM_PXE;
%ignore RMCP_ASF_CAP_RESET_BOTH;
%ignore RMCP_ASF_CAP_POWER_UP_BOTH;
%ignore RMCP_ASF_CAP_POWER_DOWN_BOTH;
%ignore RMCP_ASF_CAP_POWER_CYCLE_BOTH;
%ignore RMCP_ASF_CAP_RESET_SECURE;
%ignore RMCP_ASF_CAP_POWER_UP_SECURE;
%ignore RMCP_ASF_CAP_POWER_DOWN_SECURE;
%ignore RMCP_ASF_CAP_POWER_CYCLE_SECURE;
%ignore RMCP_ASF_FCAP_B1_SLEEP_BUTTON_LOCK;
%ignore RMCP_ASF_FCAP_B1_LOCK_KEYBOARD;
%ignore RMCP_ASF_FCAP_B1_RESET_BUTTON_LOCK;
%ignore RMCP_ASF_FCAP_B1_POWER_BUTTON_LOCK;
%ignore RMCP_ASF_FCAP_B1_FW_VERB_SCREEN_BLANK;
%ignore RMCP_ASF_FCAP_B2_CONFIG_DATA_RESET;
%ignore RMCP_ASF_FCAP_B2_FW_VERB_QUIET;
%ignore RMCP_ASF_FCAP_B2_FW_VERB_VERB;
%ignore RMCP_ASF_FCAP_B2_FORCED_PROG_EVENTS;
%ignore RMCP_ASF_FCAP_B2_USER_PASSWD_BYPASS;
%ignore RMCP_ASF_SYSSTATEMASK;
/**
 * We leave these in because people have to decode the state/watchdog values.
 * ignore RMCP_ASF_SYSSTATE_S0_G0;
 * ignore RMCP_ASF_SYSSTATE_S1;
 * ignore RMCP_ASF_SYSSTATE_S2;
 * ignore RMCP_ASF_SYSSTATE_S3;
 * ignore RMCP_ASF_SYSSTATE_S4;
 * ignore RMCP_ASF_SYSSTATE_S5_G2;
 * ignore RMCP_ASF_SYSSTATE_S4_S5;
 * ignore RMCP_ASF_SYSSTATE_G3;
 * ignore RMCP_ASF_SYSSTATE_S1_S2_S3;
 * ignore RMCP_ASF_SYSSTATE_G1;
 * ignore RMCP_ASF_SYSSTATE_S5_OVERRIDE;
 * ignore RMCP_ASF_SYSSTATE_LON;
 * ignore RMCP_ASF_SYSSTATE_LOFF;
 * ignore RMCP_ASF_SYSSTATE_UNKNOWN;
 * ignore RMCP_ASF_SYSSTATE_RESERVED;
 * ignore RMCP_ASF_WDSTATEMASK_EXPIRED;
 */
%ignore RMCP_RSP_RAKP_SUCCESS;
%ignore RMCP_RSP_RAKP_ERR_RESOURCES;
%ignore RMCP_RSP_RAKP_ERR_INVALID_SID;
%ignore RMCP_RSP_RAKP_ERR_INVALID_PAYLOAD;
%ignore RMCP_RSP_RAKP_ERR_INVALID_AUTH_ALG;
%ignore RMCP_RSP_RAKP_ERR_INVALID_INTEGRITY_ALG;
%ignore RMCP_RSP_RAKP_ERR_NOMATCH_AUTH;
%ignore RMCP_RSP_RAKP_ERR_NOMATCH_INTEGRITY;
%ignore RMCP_RSP_RAKP_ERR_INACTIVE_SID;
%ignore RMCP_RSP_RAKP_ERR_INVALID_ROLE;
%ignore RMCP_RSP_RAKP_ERR_UNAUTH_ROLE;
%ignore RMCP_RSP_RAKP_ERR_RESOURCES_ROLE;
%ignore RMCP_RSP_RAKP_ERR_INVALID_NAMELEN;
%ignore RMCP_RSP_RAKP_ERR_UNAUTH_NAME;
%ignore RMCP_RSP_RAKP_ERR_UNAUTH_GUID;
%ignore RMCP_RSP_RAKP_ERR_INVALID_INTEGRITY_VALUE;



/* slurp up the remnants... */
%include "rmcp.h"