Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
lguest.c File Reference
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <err.h>
#include <stdint.h>
#include <stdlib.h>
#include <elf.h>
#include <sys/mman.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/eventfd.h>
#include <fcntl.h>
#include <stdbool.h>
#include <errno.h>
#include <ctype.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <time.h>
#include <netinet/in.h>
#include <net/if.h>
#include <linux/sockios.h>
#include <linux/if_tun.h>
#include <sys/uio.h>
#include <termios.h>
#include <getopt.h>
#include <assert.h>
#include <sched.h>
#include <limits.h>
#include <stddef.h>
#include <signal.h>
#include <pwd.h>
#include <grp.h>
#include <linux/virtio_config.h>
#include <linux/virtio_net.h>
#include <linux/virtio_blk.h>
#include <linux/virtio_console.h>
#include <linux/virtio_rng.h>
#include <linux/virtio_ring.h>
#include <asm/bootparam.h>
#include "../../include/linux/lguest_launcher.h"

Go to the source code of this file.

Data Structures

struct  device_list
 
class  device
 
struct  virtqueue
 
struct  console_abort
 
struct  net_info
 
struct  vblk_info
 
struct  rng_info
 

Macros

#define _LARGEFILE64_SOURCE
 
#define _GNU_SOURCE
 
#define BRIDGE_PFX   "bridge:"
 
#define SIOCBRADDIF   0x89a2 /* add interface to bridge */
 
#define DEVICE_PAGES   256
 
#define VIRTQUEUE_NUM   256
 
#define verbose(args...)   do { if (verbose) printf(args); } while(0)
 
#define wmb()   __asm__ __volatile__("" : : : "memory")
 
#define mb()   __asm__ __volatile__("" : : : "memory")
 
#define convert(iov, type)   ((type *)_convert((iov), sizeof(type), __alignof__(type), #type))
 
#define lg_last_avail(vq)   ((vq)->last_avail_idx)
 
#define cpu_to_le16(v16)   (v16)
 
#define cpu_to_le32(v32)   (v32)
 
#define cpu_to_le64(v64)   (v64)
 
#define le16_to_cpu(v16)   (v16)
 
#define le32_to_cpu(v32)   (v32)
 
#define le64_to_cpu(v64)   (v64)
 
#define check_pointer(addr, size)   _check_pointer(addr, size, __LINE__)
 

Typedefs

typedef unsigned long long u64
 
typedef uint32_t u32
 
typedef uint16_t u16
 
typedef uint8_t u8
 

Functions

int main (int argc, char *argv[])
 

Macro Definition Documentation

#define _GNU_SOURCE

Definition at line 8 of file lguest.c.

#define _LARGEFILE64_SOURCE

Definition at line 7 of file lguest.c.

#define BRIDGE_PFX   "bridge:"

Definition at line 68 of file lguest.c.

#define check_pointer (   addr,
  size 
)    _check_pointer(addr, size, __LINE__)

Definition at line 594 of file lguest.c.

#define convert (   iov,
  type 
)    ((type *)_convert((iov), sizeof(type), __alignof__(type), #type))

Definition at line 192 of file lguest.c.

#define cpu_to_le16 (   v16)    (v16)

Definition at line 212 of file lguest.c.

#define cpu_to_le32 (   v32)    (v32)

Definition at line 213 of file lguest.c.

#define cpu_to_le64 (   v64)    (v64)

Definition at line 214 of file lguest.c.

#define DEVICE_PAGES   256

Definition at line 73 of file lguest.c.

#define le16_to_cpu (   v16)    (v16)

Definition at line 215 of file lguest.c.

#define le32_to_cpu (   v32)    (v32)

Definition at line 216 of file lguest.c.

#define le64_to_cpu (   v64)    (v64)

Definition at line 217 of file lguest.c.

#define lg_last_avail (   vq)    ((vq)->last_avail_idx)

Definition at line 206 of file lguest.c.

#define mb (   void)    __asm__ __volatile__("" : : : "memory")

Definition at line 180 of file lguest.c.

#define SIOCBRADDIF   0x89a2 /* add interface to bridge */

Definition at line 70 of file lguest.c.

#define verbose (   args...)    do { if (verbose) printf(args); } while(0)

Definition at line 82 of file lguest.c.

#define VIRTQUEUE_NUM   256

Definition at line 75 of file lguest.c.

#define wmb ( )    __asm__ __volatile__("" : : : "memory")

Definition at line 179 of file lguest.c.

Typedef Documentation

typedef uint16_t u16

Definition at line 64 of file lguest.c.

typedef uint32_t u32

Definition at line 63 of file lguest.c.

typedef unsigned long long u64

Definition at line 62 of file lguest.c.

typedef uint8_t u8

Definition at line 65 of file lguest.c.

Function Documentation

int main ( int  argc,
char argv[] 
)

Definition at line 1869 of file lguest.c.