-#include "ethernetframe.h"
-#include "media.h"
-#include "dev.h"
+#include "devque.h"
#include <iostream>
#include <cassert>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/msg.h>
int main()
{
- int que_id = msgget(0xabcdef, IPC_CREAT | 0666);
+ int que_id = msgget(DEVQUE_DEFAULT_KEY, IPC_CREAT | 0666);
assert(que_id != -1);
- Media media(0xabcdef);
- Dev dev(1234, media);
- EthernetFrame<1500> f(1234, "hola mundo");
- dev.send(f);
- std::cout << "Enviado '" << f._frame << "' a " << f._mac << "\n";
+ DevQue dev(1234);
+ dev.transmit("hola mundo", 4321);
+ std::cout << "Enviado 'hola mundo' a 4321\n";
return 0;
}