MIG & RPC Fun
Index
Why can't I make Mach calls unless I'm root (under MkLinux)?
It seems like the programmers working on the MkLinux mach server (and
perhaps other servers as well?) decided that making Mach system calls
exposed a possible security hole (I dunno what kind...), making them
resort to prohibiting their use by processes not running with the uid
of root (0).
What do all these strange acronyms mean?
There are a number of acronyms that are frequently used when dealing
with Mach remote messaging stuff. Here's a small listing of some
of them with their expanded meanings:
- MIG : Mach Interface Generator. A program that uses a special
programming language to expediate the design and production of mach messaging
systems.
- RPC : Remote Procedure Calls. A mach facility for providing an
interface similar to a simple C function call for sending Mach messages
between ports, even across tasks.
What is the general procedure for making a Mach RPC system?
The general procedure for making an RPC system, or subsystem,
is as follows:
- Make a .defs file to define the facilities and protocols provided
by your subsystem
- Run your .defs file through mig. Mig will produce three files
(xxxServer.c, xxxUser.c, and xxxUser.h, where xxx is the name of the
subsystem defined).
- Make a server process that receives mach messages on a particular
port, perhaps in a loop, using mach_msg(port, MACH_RCV_MSG,...).
- Make a client process that sends messages over the port that the
server is listening on, using mach_msg(port, MACH_SEND_MSG,...).
This page is copyrighted 1997, by
David T. McWherter.