cscg24-guacamole

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

wol-constants.h (1688B)


      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_CONSTANTS_H
     21#define GUAC_WOL_CONSTANTS_H
     22
     23/**
     24 * Header file that provides constants and defaults related to libguac
     25 * Wake-on-LAN support.
     26 * 
     27 * @file wol-constants.h
     28 */
     29
     30/**
     31 * The value for the local IPv4 broadcast address.
     32 */
     33#define GUAC_WOL_LOCAL_IPV4_BROADCAST "255.255.255.255"
     34
     35/**
     36 * The size of the magic Wake-on-LAN packet to send to wake a remote host.  This
     37 * consists of 6 bytes of 0xFF, and then the MAC address repeated 16 times.
     38 * https://en.wikipedia.org/wiki/Wake-on-LAN#Magic_packet
     39 */
     40#define GUAC_WOL_PACKET_SIZE 102
     41
     42/**
     43 * The port number that the magic packet should contain as the destination.  In
     44 * reality this doesn't matter all that much, since the packet is not usually
     45 * processed by a full IP stack, but defining one is considered a standard
     46 * practice.
     47 */
     48#define GUAC_WOL_PORT 9
     49
     50#endif /* GUAC_WOL_CONSTANTS_H */
     51