NOVA User-Level Environment
Version testbox/changed-memory-timing-317-g320d8b5
|
#include <arpa/inet.h>
#include <assert.h>
#include <fcntl.h>
#include <iostream>
#include <netdb.h>
#include <netinet/in.h>
#include <poll.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
Classes | |
class | CommandStr |
class | IpRelay |
class | Client |
A simple per-cpu client. More... |
Macros | |
#define | MAX_CLIENTS 3 |
#define | SE "\xF0" |
#define | NOP "\xF1" |
#define | AYT "\xF6" |
#define | SB "\xFA" |
#define | WILL "\xFB" |
#define | WONT "\xFC" |
#define | DO "\xFD" |
#define | DONT "\xFE" |
#define | IAC "\xFF" |
#define | CHECK(cmd) ({ int ret = (cmd); if (ret == -1) { printf("error on line %d: " #cmd ": %s\n", __LINE__, strerror(errno)); exit(1); }; ret; }) |
Enumerations | |
enum | { FD_LISTEN_LP, FD_LISTEN_HP, FD_IP_RELAY, FD_CLIENT, FD_COUNT = FD_CLIENT + MAX_CLIENTS } |
Functions | |
const string | are_you_there (IAC AYT) |
const string | nop (IAC NOP) |
const string | reset_on (IAC SB"\x2C\x32\x26"IAC SE) |
const string | reset_off (IAC SB"\x2C\x32\x16"IAC SE) |
const string | power_on (IAC SB"\x2C\x32\x25"IAC SE) |
const string | power_off (IAC SB"\x2C\x32\x15"IAC SE) |
const string | reset_on_confirmation (IAC SB"\x2C\x97\xBF"IAC SE) |
const string | reset_off_confirmation (IAC SB"\x2C\x97\xFF"IAC SE) |
const string | power_on_confirmation (IAC SB"\x2C\x97\xDF"IAC SE) |
const string | power_off_confirmation (IAC SB"\x2C\x97\xFF"IAC SE) |
int | msg (const char *fmt,...) __attribute__((format(printf |
int | main (int argc, char *argv[]) |
#define AYT "\xF6" |
#define CHECK | ( | cmd | ) | ({ int ret = (cmd); if (ret == -1) { printf("error on line %d: " #cmd ": %s\n", __LINE__, strerror(errno)); exit(1); }; ret; }) |
#define DO "\xFD" |
#define DONT "\xFE" |
#define IAC "\xFF" |
#define MAX_CLIENTS 3 |
#define NOP "\xF1" |
#define SB "\xFA" |
#define SE "\xF0" |
#define WILL "\xFB" |
#define WONT "\xFC" |
const string are_you_there | ( | IAC | AYT | ) |
int main | ( | int | argc, |
char * | argv[] | ||
) |
int int msg | ( | const char * | fmt, |
... | |||
) |
const string nop | ( | IAC | NOP | ) |