[klee-commits] [1499] Added connected socket data structure

cristic at stanford.edu cristic at stanford.edu
Fri Mar 13 19:11:49 PDT 2009


Revision: 1499
          http://keeda.stanford.edu/viewvc/viewvc.cgi?view=rev&revision=1499
Author:   cristic
Date:     2009-03-13 19:11:49 -0700 (Fri, 13 Mar 2009)
Log Message:
-----------
Added connected socket data structure

Modified Paths:
--------------
    models/simple/fd.h
    models/simple/fd_init.c

Modified: models/simple/fd.h
===================================================================
--- models/simple/fd.h	2009-03-13 23:14:24 UTC (rev 1498)
+++ models/simple/fd.h	2009-03-14 02:11:49 UTC (rev 1499)
@@ -7,6 +7,7 @@
 #include <sys/types.h>
 #include <sys/statfs.h>
 #include <dirent.h>
+#include <netinet/in.h>
 
 typedef struct {  
   unsigned size;  /* in bytes */
@@ -14,6 +15,13 @@
   struct stat64* stat;
 } exe_disk_file_t;
 
+typedef struct {
+  int domain;
+  int protocol;
+  struct sockaddr_storage local;
+  struct sockaddr_storage remote;
+} exe_conn_t;
+
 typedef enum {
   eOpen         = (1 << 0),
   eCloseOnExec  = (1 << 1),
@@ -28,6 +36,9 @@
                                has eOpen. */
   off64_t off;              /* offset */
   exe_disk_file_t* dfile;   /* ptr to file on disk, if symbolic */
+  exe_conn_t *conn;        /* ptr to a connection, if a symbolic
+                               connected socket.  If non-null, dfile
+                               is non-null either */
 } exe_file_t;
 
 typedef struct {

Modified: models/simple/fd_init.c
===================================================================
--- models/simple/fd_init.c	2009-03-13 23:14:24 UTC (rev 1498)
+++ models/simple/fd_init.c	2009-03-14 02:11:49 UTC (rev 1499)
@@ -26,9 +26,9 @@
 
 
 exe_sym_env_t __exe_env = { 
-  {{ 0, eOpen | eReadable, 0, 0}, 
-   { 1, eOpen | eWriteable, 0, 0}, 
-   { 2, eOpen | eWriteable, 0, 0}},
+  {{ 0, eOpen | eReadable, 0, 0, 0}, 
+   { 1, eOpen | eWriteable, 0, 0, 0}, 
+   { 2, eOpen | eWriteable, 0, 0, 0}},
   022,
   0,
   0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://keeda.Stanford.EDU/pipermail/klee-commits/attachments/20090313/0f46c2e3/attachment-0001.html 


More information about the klee-commits mailing list