summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2013-12-13 11:00:14 +0000
committerramon <ramongomez@us.es>2013-12-13 11:00:14 +0000
commit91c53267705d27337f91e7cd93a223b3feb82d40 (patch)
tree2ab1c99edc41fcda5152512c26e53210fbaf57c5 /client
parentd2f28cfc7ed294ce937f86fb4d41948ac3eb593b (diff)
#537: integrar función {{{ogMcastRequest}}}.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4105 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client')
-rwxr-xr-xclient/engine/Protocol.lib42
1 files changed, 41 insertions, 1 deletions
diff --git a/client/engine/Protocol.lib b/client/engine/Protocol.lib
index 102ed1c7..ecf8f3b5 100755
--- a/client/engine/Protocol.lib
+++ b/client/engine/Protocol.lib
@@ -4,7 +4,7 @@
#@brief Librería o clase Protocol
#@class Protocol
#@brief Funciones para transmisión de datos
-#@version 1.0
+#@version 1.0.5
#@warning License: GNU GPLv3+
#*/
@@ -707,6 +707,46 @@ fi
}
+#/**
+# ogMcastRequest
+#@brief Función temporal para solicitar al ogRepoAux el envio de un fichero por multicast
+#@param 1 Fichero a enviar ubicado en el REPO. puede ser ruta absoluta o relatica a /opt/opengnsys/images
+#@param 2 PROTOOPT opciones protocolo multicast
+#@return
+#@exception
+#@note
+#@todo:
+#@version 1.0.5
+#@author Antonio Doblas Viso, Universidad de Málaga
+#@date 2012/05/29
+#*/ ##
+function ogMcastRequest {
+# Variables locales
+local FILE PROTOOPT PORT PORTAUX REPOIP REPOPORTAUX REPEAT
+FILE="$1"
+PROTOOPT="$2"
+
+#TODO AYUDA
+#TODO: CONTROL PARAMETROS
+
+PORT=$(echo $2 | cut -f1 -d":")
+let PORTAUX=$PORT+1
+REPOIP=$(ogGetRepoIp)
+REPOPORTAUX=2009
+REPEAT=0
+until nmap -n -sU -p $PORTAUX $REPOIP | grep open
+do
+ echo "$MSG_SCRIPTS_TASK_START : hose $REPOIP $REPOPORTAUX --out sh -c "echo -ne START_MULTICAST $1 $2""
+ #update-cache:
+ hose $REPOIP $REPOPORTAUX --out sh -c "echo -ne START_MULTICAST "$FILE" "$PROTOOPT""
+ #multicas-direct: hose $REPOIP 2009 --out sh -c "echo -ne START_MULTICAST /$IMAGE.img $OPTPROTOCOLO"
+ let REPEAT=$REPEAT+1
+ [ "$REPEAT" -eq 5 ] && return
+ sleep 10
+done
+}
+
+
##########################################
############## funciones torrent
#/**