Last change
on this file since 6e70916 was
1f13855,
checked in by OpenGnSys Support Team <soporte-og@…>, 4 years ago
|
#1043 add WOL_SENT state
WOL_SENT tells that WakeOnLan? was sent to computer, after 60 seconds,
if computer does not boot, this state is released.
|
-
Property mode set to
100644
|
File size:
957 bytes
|
Rev | Line | |
---|
[96b02b5] | 1 | #ifndef _OG_WOL_H_ |
---|
| 2 | #define _OG_WOL_H_ |
---|
| 3 | |
---|
| 4 | #define OG_WOL_SEQUENCE 6 |
---|
| 5 | #define OG_WOL_MACADDR_LEN 6 |
---|
| 6 | #define OG_WOL_REPEAT 16 |
---|
| 7 | |
---|
[1f13855] | 8 | #include "list.h" |
---|
| 9 | #include <ev.h> |
---|
[96b02b5] | 10 | #include <stdbool.h> |
---|
| 11 | |
---|
| 12 | struct wol_msg { |
---|
| 13 | char secuencia_FF[OG_WOL_SEQUENCE]; |
---|
| 14 | char macbin[OG_WOL_REPEAT][OG_WOL_MACADDR_LEN]; |
---|
| 15 | }; |
---|
| 16 | |
---|
[060e31c] | 17 | int wol_socket_open(void); |
---|
[96b02b5] | 18 | bool wake_up_send(int sd, struct sockaddr_in *client, |
---|
| 19 | const struct wol_msg *msg, const struct in_addr *addr); |
---|
| 20 | bool wake_up_broadcast(int sd, struct sockaddr_in *client, |
---|
| 21 | const struct wol_msg *msg); |
---|
| 22 | |
---|
[1f13855] | 23 | struct og_client_wol { |
---|
| 24 | struct list_head list; |
---|
| 25 | struct in_addr addr; |
---|
| 26 | struct ev_timer timer; |
---|
| 27 | }; |
---|
| 28 | |
---|
| 29 | struct og_client_wol *og_client_wol_create(const struct in_addr *addr); |
---|
| 30 | struct og_client_wol *og_client_wol_find(const struct in_addr *addr); |
---|
| 31 | void og_client_wol_refresh(struct og_client_wol *cli_wol); |
---|
| 32 | void og_client_wol_destroy(struct og_client_wol *cli_wol); |
---|
| 33 | const char *og_client_wol_status(const struct og_client_wol *wol); |
---|
| 34 | |
---|
[96b02b5] | 35 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.