Changeset 7c410f9
- Timestamp:
- 11/09/21 23:42:52 (3 years ago)
- Branches:
- master
- Children:
- 105afb5, 929bb42
- Parents:
- 1ebb340
- Location:
- npl/syn3/synwatchdog
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
npl/syn3/synwatchdog/syndog.c
r1ebb340 r7c410f9 26 26 #define MAX_OBSERVE_DELAY 10 27 27 28 #define MAX_ETHS 1028 #define MAX_ETHS 2000 29 29 30 30 //size of eth device names 31 #define DEV_SIZE 1031 #define DEV_SIZE 30 32 32 33 33 … … 257 257 ifindex2dev(s, ifindex, dev); 258 258 259 //..store source mac adress of the destination device in packet: 260 char src_mac[ETH_ALEN]; 261 getmac(s, dev, src_mac); 262 memcpy((void*)(packet+ETH_ALEN), (void*)src_mac, ETH_ALEN); 263 264 //select correct destination interface: 265 socket_address.sll_ifindex = ifindex; 266 267 //send it! 268 int send_result; 269 send_result = sendto( 270 s, 271 packet, 272 ETH_HLEN +datalen, 273 0, 274 (struct sockaddr*)&socket_address, 275 sizeof(socket_address)); 276 277 if (send_result == -1 && errno!=6 && errno!= 100) 278 printf("send error on interface %d: %d: %s\n", ifindex, errno, strerror(errno)); 259 if (strncmp("eth",dev,3)==0) 260 { 261 262 //..store source mac adress of the destination device in packet: 263 char src_mac[ETH_ALEN]; 264 getmac(s, dev, src_mac); 265 memcpy((void*)(packet+ETH_ALEN), (void*)src_mac, ETH_ALEN); 266 267 //select correct destination interface: 268 socket_address.sll_ifindex = ifindex; 269 270 //send it! 271 int send_result; 272 send_result = sendto( 273 s, 274 packet, 275 ETH_HLEN +datalen, 276 0, 277 (struct sockaddr*)&socket_address, 278 sizeof(socket_address)); 279 280 if (send_result == -1 && errno!=6 && errno!= 100) 281 printf("send error on interface %d: %d: %s\n", ifindex, errno, strerror(errno)); 282 } 279 283 } 280 284 sleep(BARF_DELAY); -
npl/syn3/synwatchdog/synwatchdog.build
r1ebb340 r7c410f9 1 64 191 6422 -
npl/syn3/synwatchdog/synwatchdog.md5
r1ebb340 r7c410f9 1 1 b3e0140fa5758f8a744b4f7838cc504c ./Makefile 2 2 0fd55b55f46e80f95f7379bc0725e76e ./run 3 d41ad071e4038d82a6201808d5e50b86./syndog.c4 a6d9ce4aa96aee981a2b323069c75f62./synwatchdog.pkg3 8c5abe40ea1c82804d11e48bf085dcf5 ./syndog.c 4 280d5fc169584409e1de8f29edc77b04 ./synwatchdog.pkg 5 5 0eb9646e63e0d19ae4c4993bd8976024 ./synwatchdog.SlackBuild 6 9db16788c1e8a39e33d124de305195f5./synwatchdog.SlackBuild.log.gz6 e4de1398523305cb607435535cbe1544 ./synwatchdog.SlackBuild.log.gz
Note: See TracChangeset
for help on using the changeset viewer.