Ejemplo n.º 1
0
#include "includes.h"
#include "librpc/rpc/dcerpc.h"
#include "rpc_common.h"

struct dcerpc_fault_table {
	const char *errstr;
	uint32_t faultcode;
	NTSTATUS nt_status;
};

static const struct dcerpc_fault_table dcerpc_faults[] =
{
#define _FAULT_STR(x, s) { .errstr = #x , .faultcode = x, .nt_status = s }
#define _FAULT_STR_NO_NT_MAPPING(x) _FAULT_STR(x, NT_STATUS_RPC_NOT_RPC_ERROR)
	_FAULT_STR(DCERPC_NCA_S_COMM_FAILURE, NT_STATUS_RPC_COMM_FAILURE),
	_FAULT_STR(DCERPC_NCA_S_OP_RNG_ERROR, NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE),
	_FAULT_STR(DCERPC_NCA_S_UNKNOWN_IF, NT_STATUS_RPC_UNKNOWN_IF),
	_FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_WRONG_BOOT_TIME),
	_FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_YOU_CRASHED),
	_FAULT_STR(DCERPC_NCA_S_PROTO_ERROR, NT_STATUS_RPC_PROTOCOL_ERROR),
	_FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_OUT_ARGS_TOO_BIG),
	_FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_SERVER_TOO_BUSY),
	_FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_STRING_TOO_LARGE),
	_FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_UNSUPPORTED_TYPE),
	_FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_ADDR_ERROR),
	_FAULT_STR(DCERPC_NCA_S_FAULT_FP_DIV_BY_ZERO, NT_STATUS_RPC_FP_DIV_ZERO),
	_FAULT_STR(DCERPC_NCA_S_FAULT_FP_UNDERFLOW, NT_STATUS_RPC_FP_UNDERFLOW),
	_FAULT_STR(DCERPC_NCA_S_FAULT_FP_OVERRFLOW, NT_STATUS_RPC_FP_OVERFLOW),
	_FAULT_STR(DCERPC_NCA_S_FAULT_INT_DIV_BY_ZERO, NT_STATUS_RPC_FP_DIV_ZERO),
	_FAULT_STR(DCERPC_NCA_S_FAULT_INT_OVERFLOW, NT_STATUS_RPC_FP_OVERFLOW),
Ejemplo n.º 2
0
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#include "includes.h"
#include "librpc/rpc/dcerpc.h"
#include "rpc_common.h"

struct dcerpc_fault_table {
	const char *errstr;
	uint32_t faultcode;
};

static const struct dcerpc_fault_table dcerpc_faults[] =
{
#define _FAULT_STR(x) { #x , x }
	_FAULT_STR(DCERPC_NCA_S_COMM_FAILURE),
	_FAULT_STR(DCERPC_NCA_S_OP_RNG_ERROR),
	_FAULT_STR(DCERPC_NCA_S_UNKNOWN_IF),
	_FAULT_STR(DCERPC_NCA_S_WRONG_BOOT_TIME),
	_FAULT_STR(DCERPC_NCA_S_YOU_CRASHED),
	_FAULT_STR(DCERPC_NCA_S_PROTO_ERROR),
	_FAULT_STR(DCERPC_NCA_S_OUT_ARGS_TOO_BIG),
	_FAULT_STR(DCERPC_NCA_S_SERVER_TOO_BUSY),
	_FAULT_STR(DCERPC_NCA_S_FAULT_STRING_TOO_LARGE),
	_FAULT_STR(DCERPC_NCA_S_UNSUPPORTED_TYPE),
	_FAULT_STR(DCERPC_NCA_S_FAULT_INT_DIV_BY_ZERO),
	_FAULT_STR(DCERPC_NCA_S_FAULT_ADDR_ERROR),
	_FAULT_STR(DCERPC_NCA_S_FAULT_FP_DIV_BY_ZERO),
	_FAULT_STR(DCERPC_NCA_S_FAULT_FP_UNDERFLOW),
	_FAULT_STR(DCERPC_NCA_S_FAULT_FP_OVERRFLOW),
	_FAULT_STR(DCERPC_NCA_S_FAULT_INVALID_TAG),