X-Git-Url: https://git.llucax.com/z.facultad/75.74/practicos.git/blobdiff_plain/3de68addc94548e2191d83b7aa4ebec21957391e..9ee7a97ec97d3dc41e1367f1f457d5ed5d5270ea:/practicas/pipi/src/test_send.cpp?ds=inline diff --git a/practicas/pipi/src/test_send.cpp b/practicas/pipi/src/test_send.cpp index 559ad8c..5b78b2c 100644 --- a/practicas/pipi/src/test_send.cpp +++ b/practicas/pipi/src/test_send.cpp @@ -1,19 +1,20 @@ -#include "ethernetframe.h" -#include "media.h" -#include "dev.h" +#include "devque.h" #include #include +#include +#include +#include +#include +#include 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; }