File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 3232#define WIDTH 256
3333#define HEIGHT 256
3434
35- #define xstr (x ) str(x)
36- #define str (x ) #x
37-
38- #ifndef INTERFACE
39- #error "define INTERFACE in sledconf"
40- #endif
41-
4235typedef struct
4336{
4437 uint8_t b ;
@@ -127,7 +120,7 @@ void wait_until_break(int _modno)
127120 #endif
128121}
129122
130- int init (void ) {
123+ int init (int moduleno , char * argstr ) {
131124 struct ifreq if_idx ;
132125
133126 /* Open RAW socket to send on */
@@ -138,7 +131,7 @@ int init(void) {
138131
139132 /* Get the index of the interface to send on */
140133 memset (& if_idx , 0 , sizeof (struct ifreq ));
141- strncpy (if_idx .ifr_name , xstr ( INTERFACE ) , IFNAMSIZ - 1 );
134+ strncpy (if_idx .ifr_name , argstr , IFNAMSIZ - 1 );
142135 if (ioctl (sockfd , SIOCGIFINDEX , & if_idx ) < 0 )
143136 {
144137 perror ("SIOCGIFINDEX" );
You can’t perform that action at this time.
0 commit comments