cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

wol.h (1860B)


      1/*
      2 * Licensed to the Apache Software Foundation (ASF) under one
      3 * or more contributor license agreements.  See the NOTICE file
      4 * distributed with this work for additional information
      5 * regarding copyright ownership.  The ASF licenses this file
      6 * to you under the Apache License, Version 2.0 (the
      7 * "License"); you may not use this file except in compliance
      8 * with the License.  You may obtain a copy of the License at
      9 *
     10 *   http://www.apache.org/licenses/LICENSE-2.0
     11 *
     12 * Unless required by applicable law or agreed to in writing,
     13 * software distributed under the License is distributed on an
     14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     15 * KIND, either express or implied.  See the License for the
     16 * specific language governing permissions and limitations
     17 * under the License.
     18 */
     19
     20#ifndef GUAC_WOL_H
     21#define GUAC_WOL_H
     22
     23/**
     24 * Header that provides functions and structures related to Wake-on-LAN
     25 * support in libguac.
     26 * 
     27 * @file wol.h
     28 */
     29
     30#include "wol-constants.h"
     31
     32/**
     33 * Send the wake-up packet to the specified destination, returning zero if the
     34 * wake was sent successfully, or non-zero if an error occurs sending the
     35 * wake packet.  Note that the return value does not specify whether the
     36 * system actually wakes up successfully, only whether or not the packet
     37 * is transmitted.
     38 * 
     39 * @param mac_addr
     40 *     The MAC address to place in the magic Wake-on-LAN packet.
     41 * 
     42 * @param broadcast_addr
     43 *     The broadcast address to which to send the magic Wake-on-LAN packet.
     44 * 
     45 * @param udp_port
     46 *     The UDP port to use when sending the WoL packet.
     47 * 
     48 * @return 
     49 *     Zero if the packet is successfully sent to the destination; non-zero
     50 *     if the packet cannot be sent.
     51 */
     52int guac_wol_wake(const char* mac_addr, const char* broadcast_addr,
     53        const unsigned short udp_port);
     54
     55#endif /* GUAC_WOL_H */
     56