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 32
32
#define WIDTH 256
33
33
#define HEIGHT 256
34
34
35
- #define xstr (x ) str(x)
36
- #define str (x ) #x
37
-
38
- #ifndef INTERFACE
39
- #error "define INTERFACE in sledconf"
40
- #endif
41
-
42
35
typedef struct
43
36
{
44
37
uint8_t b ;
@@ -127,7 +120,7 @@ void wait_until_break(int _modno)
127
120
#endif
128
121
}
129
122
130
- int init (void ) {
123
+ int init (int moduleno , char * argstr ) {
131
124
struct ifreq if_idx ;
132
125
133
126
/* Open RAW socket to send on */
@@ -138,7 +131,7 @@ int init(void) {
138
131
139
132
/* Get the index of the interface to send on */
140
133
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 );
142
135
if (ioctl (sockfd , SIOCGIFINDEX , & if_idx ) < 0 )
143
136
{
144
137
perror ("SIOCGIFINDEX" );
You can’t perform that action at this time.
0 commit comments