source: ogServer-Git/src/ogAdmServer.h @ 06af0c2

Last change on this file since 06af0c2 was 06af0c2, checked in by OpenGnSys Support Team <soporte-og@…>, 4 years ago

#990 Use client broadcast address on WoL

Some universities have computers in a different subnet where the
ogServer is, but ogServer WoL functionality only supported to send
packet to its own subnets. This commit solves this.

Now ogServer sends two WoL packets per client, one with the broadcast
address of the interface indicated in the config file, the other with
the broadcast address calculated with the address and netmask of the
client.

To ensure that the second WoL works correctly you must configure
correctly the IP and netmask of the clients. Also, you have to configure
the network of your organization to route WoL packet to the correct
subnet.

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[b9eb98b]1// ********************************************************************************************************
2// Servicio: ogAdmServer
3// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
4// Fecha Creación: Marzo-2010
5// Fecha Última modificación: Marzo-2010
6// Nombre del fichero: ogAdmServer.h
7// Descripción: Este fichero implementa el servicio de administración general del sistema
8// ********************************************************************************************************
9#include <stdio.h>
10#include <stdlib.h>
11#include <string.h>
12#include <ctype.h>
13#include <errno.h>
14#include <unistd.h>
15#include <time.h>
16#include <sys/types.h>
17#include <sys/socket.h>
18#include <netinet/in.h>
19#include <arpa/inet.h>
[f74067f]20#include <stdbool.h>
[b9eb98b]21#include "ogAdmLib.h"
[d6789f1]22
23extern char auth_token[4096];
24extern char usuario[4096];
25extern char pasguor[4096];
26extern char catalog[4096];
27extern char datasource[4096];
28extern char interface[4096];
29extern char api_token[4096];
30extern char servidoradm[4096];
31extern char puerto[4096];
[b9eb98b]32
[f09aca6]33struct og_client;
34
[b9eb98b]35typedef struct{ // Estructura usada para guardar información de los clientes
36        char ip[LONIP]; // IP del cliente
37        char estado[4]; // Tipo de Sistema Operativo en que se encuentra el cliente
[f09aca6]38        struct og_client *cli;
[b9eb98b]39}SOCKETCL;
[d6789f1]40
41extern SOCKETCL tbsockets[MAXIMOS_CLIENTES];
[b9eb98b]42
[ecff994]43struct og_dbi;
44
[f74067f]45bool clienteExistente(char *,int *);
46bool clienteDisponible(char *,int *);
[fa6b891]47bool actualizaConfiguracion(struct og_dbi *,char* ,int);
[06af0c2]48bool Levanta(char**, char**, char**, int, char*);
49bool WakeUp(int,char*,char*,char*,char*);
[9cc156c]50bool actualizaCreacionImagen(struct og_dbi *,char*,char*,char*,char*,char*,char*);
[fa6b891]51bool actualizaRestauracionImagen(struct og_dbi *,char*,char*,char*,char*,char*);
[03f1941]52bool actualizaHardware(struct og_dbi *dbi, char* ,char*,char*,char*);
53bool cuestionPerfilHardware(struct og_dbi *dbi,char*,char*,int,char*,char*,int *,int);
[fa6b891]54bool actualizaSoftware(struct og_dbi *, char* , char* , char*,char*,char*);
55bool cuestionPerfilSoftware(struct og_dbi *, char*, char*,int,int,char*,char*,char*,int *,int);
[b9eb98b]56
[fa6b891]57int checkDato(struct og_dbi *,char*,const char*,const char*,const char*);
Note: See TracBrowser for help on using the repository browser.