-/* Global private data */
-typedef struct {
- gras_socket_t sock;
- int done;
-} node_data_t;
-
-static void free_host(void *d){
- xbt_host_t h=*(xbt_host_t*)d;
- free(h->name);
- free(h);
-}
-
-static void kill_buddy(char *name,int port){
- gras_socket_t sock=gras_socket_client(name,port);
- gras_msg_send(sock,gras_msgtype_by_name("kill"),NULL);
- gras_socket_close(sock);
-}
-
-static void kill_buddy_dynar(void *b) {
- xbt_host_t buddy=*(xbt_host_t*)b;
- kill_buddy(buddy->name,buddy->port);
-}
-
-static int node_cb_data_handler(gras_msg_cb_ctx_t ctx,
- void *payload_data) {
-
- /* Get the payload into the msg variable */
- int data=*(int*)payload_data;
+ int myport; /* port on which I receive stuff */
+ int todo; /* amount of messages I should get */
+ int data; /* message content */
+
+ gras_socket_t mysock; /* socket on which other people contact me */
+ gras_socket_t expeditor; /* to notice who wrote me */
+
+ /* Init the GRAS infrastructure and declare my globals */
+ gras_init(&argc,argv);
+
+ /* Get my settings from the command line */
+ myport=atoi(argv[1]);
+ todo=atoi(argv[2]);