We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa18e03 commit 740a84bCopy full SHA for 740a84b
src/modules/out_5a_75e.c
@@ -32,13 +32,6 @@
32
#define WIDTH 256
33
#define HEIGHT 256
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
typedef struct
43
{
44
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
139
/* Get the index of the interface to send on */
140
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");
0 commit comments