/**
 * 	This method sends a message to the machined process.
 */
void WatcherNub::notifyMachineGuard()
{
	u_int16_t port = 0;
	socket_.getlocaladdress( &port, NULL );

	ProcessMessage pm;
	pm.param_ = pm.PARAM_IS_MSGTYPE |
		(registered_ ? pm.REGISTER : pm.DEREGISTER);
	pm.category_ = pm.WATCHER_NUB;
	pm.uid_ = getUserId();
	pm.pid_ = mf_getpid();
	pm.port_ = port;
	pm.id_ = id_;
	pm.name_ = abrv_;

	uint32 destip = htonl( 0x7F000001U );
	int reason;
	if ((reason = pm.sendAndRecv( 0, destip )) != Mercury::REASON_SUCCESS)
	{
		ERROR_MSG( "Couldn't register watcher nub with machined: %s\n",
			Mercury::reasonToString( (Mercury::Reason)reason ) );
	}
}