/*
 * Generated by asn1c-0.9.21 (http://lionet.info/asn1c)
 * From ASN.1 module "MMS"
 * 	found in "../mms-extended.asn"
 * 	`asn1c -fskeletons-copy`
 */

#include <asn_internal.h>

#include "RejectPDU.h"

static int
memb_confirmedRequestPDU_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		_ASN_CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 9)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		_ASN_CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static int
memb_confirmedResponsePDU_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		_ASN_CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 6)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		_ASN_CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static int
memb_confirmedErrorPDU_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		_ASN_CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 4)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		_ASN_CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static int
memb_unconfirmedPDU_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		_ASN_CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 4)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		_ASN_CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static int
memb_concludeRequestPDU_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		_ASN_CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 1)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		_ASN_CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static int
memb_concludeResponsePDU_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		_ASN_CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 1)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		_ASN_CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static int
memb_concludeErrorPDU_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		_ASN_CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 2)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		_ASN_CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_TYPE_member_t asn_MBR_rejectReason_3[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RejectPDU__rejectReason, choice.confirmedRequestPDU),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_NativeInteger,
		memb_confirmedRequestPDU_constraint_3,
		0,	/* PER is not compiled, use -gen-PER */
		0,
		"confirmedRequestPDU"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RejectPDU__rejectReason, choice.confirmedResponsePDU),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_NativeInteger,
		memb_confirmedResponsePDU_constraint_3,
		0,	/* PER is not compiled, use -gen-PER */
		0,
		"confirmedResponsePDU"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RejectPDU__rejectReason, choice.confirmedErrorPDU),
		(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_NativeInteger,
		memb_confirmedErrorPDU_constraint_3,
		0,	/* PER is not compiled, use -gen-PER */
		0,
		"confirmedErrorPDU"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RejectPDU__rejectReason, choice.unconfirmedPDU),
		(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_NativeInteger,
		memb_unconfirmedPDU_constraint_3,
		0,	/* PER is not compiled, use -gen-PER */
		0,
		"unconfirmedPDU"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RejectPDU__rejectReason, choice.pduError),
		(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_INTEGER,
		0,	/* Defer constraints checking to the member type */
		0,	/* PER is not compiled, use -gen-PER */
		0,
		"pduError"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RejectPDU__rejectReason, choice.cancelRequestPDU),
		(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_NULL,
		0,	/* Defer constraints checking to the member type */
		0,	/* PER is not compiled, use -gen-PER */
		0,
		"cancelRequestPDU"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RejectPDU__rejectReason, choice.cancelResponsePDU),
		(ASN_TAG_CLASS_CONTEXT | (7 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_NULL,
		0,	/* Defer constraints checking to the member type */
		0,	/* PER is not compiled, use -gen-PER */
		0,
		"cancelResponsePDU"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RejectPDU__rejectReason, choice.cancelErrorPDU),
		(ASN_TAG_CLASS_CONTEXT | (8 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_NULL,
		0,	/* Defer constraints checking to the member type */
		0,	/* PER is not compiled, use -gen-PER */
		0,
		"cancelErrorPDU"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RejectPDU__rejectReason, choice.concludeRequestPDU),
		(ASN_TAG_CLASS_CONTEXT | (9 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_NativeInteger,
		memb_concludeRequestPDU_constraint_3,
		0,	/* PER is not compiled, use -gen-PER */
		0,
		"concludeRequestPDU"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RejectPDU__rejectReason, choice.concludeResponsePDU),
		(ASN_TAG_CLASS_CONTEXT | (10 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_NativeInteger,
		memb_concludeResponsePDU_constraint_3,
		0,	/* PER is not compiled, use -gen-PER */
		0,
		"concludeResponsePDU"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RejectPDU__rejectReason, choice.concludeErrorPDU),
		(ASN_TAG_CLASS_CONTEXT | (11 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_NativeInteger,
		memb_concludeErrorPDU_constraint_3,
		0,	/* PER is not compiled, use -gen-PER */
		0,
		"concludeErrorPDU"
		},
};
static asn_TYPE_tag2member_t asn_MAP_rejectReason_tag2el_3[] = {
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* confirmedRequestPDU at 35 */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* confirmedResponsePDU at 47 */
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* confirmedErrorPDU at 56 */
    { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 }, /* unconfirmedPDU at 63 */
    { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 4, 0, 0 }, /* pduError at 70 */
    { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 5, 0, 0 }, /* cancelRequestPDU at 74 */
    { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 6, 0, 0 }, /* cancelResponsePDU at 75 */
    { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 7, 0, 0 }, /* cancelErrorPDU at 76 */
    { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 8, 0, 0 }, /* concludeRequestPDU at 78 */
    { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 9, 0, 0 }, /* concludeResponsePDU at 82 */
    { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 10, 0, 0 } /* concludeErrorPDU at 86 */
};
static asn_CHOICE_specifics_t asn_SPC_rejectReason_specs_3 = {
	sizeof(struct RejectPDU__rejectReason),
	offsetof(struct RejectPDU__rejectReason, _asn_ctx),
	offsetof(struct RejectPDU__rejectReason, present),
	sizeof(((struct RejectPDU__rejectReason *)0)->present),
	asn_MAP_rejectReason_tag2el_3,
	11,	/* Count of tags in the map */
	0,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_rejectReason_3 = {
	"rejectReason",
	"rejectReason",
	CHOICE_free,
	CHOICE_print,
	CHOICE_constraint,
	CHOICE_decode_ber,
	CHOICE_encode_der,
	CHOICE_decode_xer,
	CHOICE_encode_xer,
	0, 0,	/* No PER support, use "-gen-PER" to enable */
	CHOICE_outmost_tag,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	0,	/* No PER visible constraints */
	asn_MBR_rejectReason_3,
	11,	/* Elements count */
	&asn_SPC_rejectReason_specs_3	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_RejectPDU_1[] = {
	{ ATF_POINTER, 1, offsetof(struct RejectPDU, originalInvokeID),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Unsigned32,
		0,	/* Defer constraints checking to the member type */
		0,	/* PER is not compiled, use -gen-PER */
		0,
		"originalInvokeID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RejectPDU, rejectReason),
		-1 /* Ambiguous tag (CHOICE?) */,
		0,
		&asn_DEF_rejectReason_3,
		0,	/* Defer constraints checking to the member type */
		0,	/* PER is not compiled, use -gen-PER */
		0,
		"rejectReason"
		},
};
static ber_tlv_tag_t asn_DEF_RejectPDU_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_RejectPDU_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* originalInvokeID at 32 */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* confirmedRequestPDU at 35 */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* confirmedResponsePDU at 47 */
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* confirmedErrorPDU at 56 */
    { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 1, 0, 0 }, /* unconfirmedPDU at 63 */
    { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 1, 0, 0 }, /* pduError at 70 */
    { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 1, 0, 0 }, /* cancelRequestPDU at 74 */
    { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 1, 0, 0 }, /* cancelResponsePDU at 75 */
    { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 1, 0, 0 }, /* cancelErrorPDU at 76 */
    { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 1, 0, 0 }, /* concludeRequestPDU at 78 */
    { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 1, 0, 0 }, /* concludeResponsePDU at 82 */
    { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 1, 0, 0 } /* concludeErrorPDU at 86 */
};
static asn_SEQUENCE_specifics_t asn_SPC_RejectPDU_specs_1 = {
	sizeof(struct RejectPDU),
	offsetof(struct RejectPDU, _asn_ctx),
	asn_MAP_RejectPDU_tag2el_1,
	12,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* Start extensions */
	-1	/* Stop extensions */
};
asn_TYPE_descriptor_t asn_DEF_RejectPDU = {
	"RejectPDU",
	"RejectPDU",
	SEQUENCE_free,
	SEQUENCE_print,
	SEQUENCE_constraint,
	SEQUENCE_decode_ber,
	SEQUENCE_encode_der,
	SEQUENCE_decode_xer,
	SEQUENCE_encode_xer,
	0, 0,	/* No PER support, use "-gen-PER" to enable */
	0,	/* Use generic outmost tag fetcher */
	asn_DEF_RejectPDU_tags_1,
	sizeof(asn_DEF_RejectPDU_tags_1)
		/sizeof(asn_DEF_RejectPDU_tags_1[0]), /* 1 */
	asn_DEF_RejectPDU_tags_1,	/* Same as above */
	sizeof(asn_DEF_RejectPDU_tags_1)
		/sizeof(asn_DEF_RejectPDU_tags_1[0]), /* 1 */
	0,	/* No PER visible constraints */
	asn_MBR_RejectPDU_1,
	2,	/* Elements count */
	&asn_SPC_RejectPDU_specs_1	/* Additional specs */
};

