X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/a7a9d75b88768cbc4c61cbdaa0bc9fad7392af00..18a0d8bbdf5091d39ce852c03a2a35000e1e0760:/tools/poke-rls.c?ds=inline diff --git a/tools/poke-rls.c b/tools/poke-rls.c index 6946fb7..557e7a9 100644 --- a/tools/poke-rls.c +++ b/tools/poke-rls.c @@ -1,3 +1,13 @@ +/* poke-rls.c + * Linux-side communication packet utility + * NetWatch system management mode administration console + * + * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved. + * This program is free software; you can redistribute and/or modify it under + * the terms found in the file LICENSE in the root of this source tree. + * + */ + #include #include #include @@ -28,7 +38,8 @@ int main(int argc, char **argv) packet_t * packet = (packet_t *)memalign(4096, sizeof(packet_t)); packet->signature = 0x1BADD00D; - packet->type = 0xF00FC7C8; + packet->type = 42; + strcpy(packet->data, "hello, world!"); if (iopl(3) < 0) { @@ -38,4 +49,10 @@ int main(int argc, char **argv) res = poke(_get_PMBASE() + 0x04, (void *)packet); printf("returned %p\n", res); + + if (res == 42) { + int i; + for (i = 0; i < 96; i++) + printf("%s\n", packet->data + i * 41); + } }