]> Joshua Wise's Git repositories - netwatch.git/blobdiff - tools/poke-rls.c
add htons
[netwatch.git] / tools / poke-rls.c
index 6946fb75fbe42d480670abb10c1f1c41e82190ca..586b4f8776c34ced8e3a47046bb0c6d2b1ef0e73 100644 (file)
@@ -28,7 +28,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 +39,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);
+       }
 }
This page took 0.023931 seconds and 4 git commands to generate.