X-Git-Url: https://git.llucax.com/z.facultad/75.74/practicos.git/blobdiff_plain/3de68addc94548e2191d83b7aa4ebec21957391e..7a01801db38786c0f1cab79b3867b8b529d5cb1c:/practicas/pipi/src/test_send.cpp diff --git a/practicas/pipi/src/test_send.cpp b/practicas/pipi/src/test_send.cpp index 559ad8c..618b862 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 #include +#include +#include +#include +#include +#include int main() { - int que_id = msgget(0xabcdef, IPC_CREAT | 0666); + int que_id = msgget(DEV_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"; + Dev dev(1234); + dev.transmit("hola mundo", 4321); + std::cout << "Enviado 'hola mundo' a 4321\n"; return 0; }