Another macro (or three):
int proc_nr;
int isokendpt(endpt, &proc_nr)
requires: endpt be a valid endpoint value of a process
postcondition: return 1 and set proc_nr to the process number
of the process with the input endpoint OR
return 0 if an error occurred