/*
 * internal.h - Internal functions and data structures at master
 *
 * Copyright 2012 by Werner Almesberger
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

#ifndef INTERNAL_H
#define	INTERNAL_H

#include <unistd.h>

#include "comm.h"


struct fd_map {
	int fd;
	void *handle;
	struct fd_map *next;
};

struct fakefile {
	pid_t pid;
	struct fakefile_peer *peer;
	struct fd_map *map;
	struct fakefile *next;
};


struct event;


struct fakefile *fakefile_launch(const char *path, char *const argv[]);
int fakefile_internal_event(struct event *ev);

#endif /* !INTERNAL_H */
