#define MACH_PORT_NULL 1
#define MACH_PORT_RECEIVE_STATUS	2
#define MACH_PORT_TYPE_DNREQUEST	0x80000000


#define MACH_PORT_RIGHT_RECEIVE		((mach_port_right_t) 1)

#define MACH_PORT_RIGHT_SEND		((mach_port_right_t) 0)

#define MACH_PORT_RECEIVE_STATUS_COUNT	((natural_t) \
	(sizeof(mach_port_status_t)/sizeof(natural_t)))


#define MACH_PORT_TYPE(a)						\
		((mach_port_type_t)(((mach_port_type_t) 1)  		\
		<< ((a) + ((mach_port_right_t) 16))))	

#define MACH_PORT_TYPE_PORT_SET	    MACH_PORT_TYPE(MACH_PORT_RIGHT_PORT_SET)

#define MACH_PORT_RIGHT_DEAD_NAME	((mach_port_right_t) 4)

#define MACH_PORT_RIGHT_PORT_SET	 ((mach_port_right_t) 3)

#define MACH_PORT_TYPE_RECEIVE	    MACH_PORT_TYPE(MACH_PORT_RIGHT_RECEIVE)


struct mach_port_status {
int mps_nsrequest;
int mps_pdrequest;
int mps_srights;
int mps_flags;
int mps_seqno;
int mps_mscount;
int mps_pset;
int mps_msgcount;
int mps_sorights;
int mps_qlimit;
};
typedef struct mach_port_status mach_port_status;
typedef mach_port_status mach_port_status_t;


typedef int mach_port_t;
typedef int mach_port_name_t;
typedef int *mach_port_name_array_t;
typedef int mach_port_right_t;
typedef int mach_port_urefs_t;
typedef int *mach_port_type_array_t;
typedef int *mach_port_info_t;
typedef int mach_port_type_t;
