c9469b64fc3933d0565ffba8a45be8a39df6b927
Stefan Schuermans cleanup file headers after...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c   1) /* BlinkenLib
Stefan Schuermans update email address of author

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c   2)    Copyright 2004-2014 Stefan Schuermans <stefan@schuermans.info>
Stefan Schuermans cleanup file headers after...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c   3)    Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
BlinkenLib/BlinkenSend.c   4)    a blinkenarea.org project */
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c              5) 
BlinkenSend.c              6) #include <stdio.h>
BlinkenSend.c              7) #include <stdlib.h>
BlinkenSend.c              8) #include <string.h>
Christian Heimke BlinkenLib v.0.5.2 (2006-05...

Christian Heimke authored 13 years ago

BlinkenSend.c              9) #ifdef WIN32
BlinkenSend.c             10) #include <winsock2.h>
Stefan Schuermans update Windows support

Stefan Schuermans authored 7 years ago

BlinkenLib/BlinkenSend.c  11) #include <ws2tcpip.h>
Christian Heimke BlinkenLib v.0.5.2 (2006-05...

Christian Heimke authored 13 years ago

BlinkenSend.c             12) #define close closesocket
BlinkenSend.c             13) #define strcasecmp stricmp
BlinkenSend.c             14) #else
Christian Heimke BlinkenLib v.0.5.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c             15) #include <unistd.h>
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c             16) #include <sys/types.h>
BlinkenSend.c             17) #include <sys/socket.h>
BlinkenSend.c             18) #include <netinet/in.h>
BlinkenSend.c             19) #include <arpa/inet.h>
Christian Heimke BlinkenLib v.0.5.2 (2006-05...

Christian Heimke authored 13 years ago

BlinkenSend.c             20) #endif
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c             21) 
Christian Heimke BlinkenLib v.0.5.5 (2008-03...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenSend.c  22) #include <BlinkenLib/BlinkenLib.h>
Stefan Schuermans add IPv6 support to Blinken...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c  23) #include "Tools2.h"
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c             24) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c  25) int main(int argCnt, char **args)
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c             26) {
Stefan Schuermans add IPv6 support to Blinken...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c  27)   int i, connected, ipv6;
BlinkenLib/BlinkenSend.c  28)   SOCKET udpSocket, tmpSock;
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c             29)   etBlinkenProto proto;
Christian Heimke BlinkenLib v.0.5.4 (2008-01...

Christian Heimke authored 13 years ago

BlinkenSend.c             30)   unsigned int maxidle, send_cnt, loop_cnt, loop, ui;
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c             31)   struct sockaddr_in addr;
Stefan Schuermans add IPv6 support to Blinken...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c  32)   struct sockaddr_in6 addr6;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c  33)   stBlinkenMovie *pMovie;
BlinkenLib/BlinkenSend.c  34) 
BlinkenLib/BlinkenSend.c  35)   // print info
BlinkenLib/BlinkenSend.c  36)   printf("BlinkenLib - BlinkenSend\n"
BlinkenLib/BlinkenSend.c  37)          "version %d.%d.%d\n"
BlinkenLib/BlinkenSend.c  38)          "config " BLINKENLIB_CONFIG "\n"
Stefan Schuermans update email address of author

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c  39)          "Copyright 2004-2014 Stefan Schuermans <stefan@schuermans.info>\n"
Stefan Schuermans cleanup file headers after...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c  40)          "Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html\n"
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c  41)          "a blinkenarea.org project\n\n",
BlinkenLib/BlinkenSend.c  42)          BLINKENLIB_VERSION_MAJOR, BLINKENLIB_VERSION_MINOR,
BlinkenLib/BlinkenSend.c  43)          BLINKENLIB_VERSION_REVISION);
BlinkenLib/BlinkenSend.c  44) 
BlinkenLib/BlinkenSend.c  45)   // print syntax
BlinkenLib/BlinkenSend.c  46)   if (argCnt <= 1) {
Stefan Schuermans output proper list of file...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c  47) #ifdef BLINKENLIB_CFG_MNG
BlinkenLib/BlinkenSend.c  48) # define MNGEXT ", *.mng"
BlinkenLib/BlinkenSend.c  49) #else
BlinkenLib/BlinkenSend.c  50) # define MNGEXT
Stefan Schuermans include gif in help of Blin...

Stefan Schuermans authored 7 years ago

BlinkenLib/BlinkenSend.c  51) #endif
BlinkenLib/BlinkenSend.c  52) #ifdef BLINKENLIB_CFG_GIF
BlinkenLib/BlinkenSend.c  53) # define GIFEXT ", *.gif"
BlinkenLib/BlinkenSend.c  54) #else
BlinkenLib/BlinkenSend.c  55) # define GIFEXT
Stefan Schuermans output proper list of file...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c  56) #endif
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c  57)     printf("syntax: %s <parameter> [...]\n\n"
BlinkenLib/BlinkenSend.c  58)            "parameters:\n"
Stefan Schuermans add IPv6 support to Blinken...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c  59)            "  -4\n"
BlinkenLib/BlinkenSend.c  60)            "     use IPv4 (default for now, subject to change)\n"
BlinkenLib/BlinkenSend.c  61)            "  -6\n"
BlinkenLib/BlinkenSend.c  62)            "     use IPv6\n"
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c  63)            "  -s [<ip>:]<port>\n"
BlinkenLib/BlinkenSend.c  64)            "     source address (defaults to 0.0.0.0:0)\n"
BlinkenLib/BlinkenSend.c  65)            "     must occur before -d and -i, may only occur once\n"
BlinkenLib/BlinkenSend.c  66)            "  -d <ip>[:<port>]\n"
BlinkenLib/BlinkenSend.c  67)            "     destination addess (defaults to 127.0.0.1:2323)\n"
BlinkenLib/BlinkenSend.c  68)            "  -p [BLP|EBLP|MCUF]\n"
BlinkenLib/BlinkenSend.c  69)            "     protocol to use (defaults to MCUF)\n"
BlinkenLib/BlinkenSend.c  70)            "  -t <milliseconds>\n"
BlinkenLib/BlinkenSend.c  71)            "     set maximum idle time between frames (defaults to 3000, use 0 for infinite)\n"
BlinkenLib/BlinkenSend.c  72)            "  -n <number>\n"
BlinkenLib/BlinkenSend.c  73)            "     set number of times to send movies (defaults to 1)\n"
BlinkenLib/BlinkenSend.c  74)            "  -i <file>\n"
Stefan Schuermans include gif in help of Blin...

Stefan Schuermans authored 7 years ago

BlinkenLib/BlinkenSend.c  75)            "     read movie from file (*.blm, *.bmm, *.bml, *.bbm" MNGEXT GIFEXT ") and send it\n"
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c  76)            "  -l <number>\n"
BlinkenLib/BlinkenSend.c  77)            "     loop number of times (defaults to 1, use 0 for forever)\n\n",
BlinkenLib/BlinkenSend.c  78)            args[0]);
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c             79)     return 0;
BlinkenSend.c             80)   }
Christian Heimke BlinkenLib v.0.5.2 (2006-05...

Christian Heimke authored 13 years ago

BlinkenSend.c             81) #ifdef WIN32
BlinkenSend.c             82)   {
BlinkenSend.c             83)     WSADATA WsaData;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c  84)     WSAStartup(0x0101, &WsaData);
Christian Heimke BlinkenLib v.0.5.2 (2006-05...

Christian Heimke authored 13 years ago

BlinkenSend.c             85)   }
BlinkenSend.c             86) #endif
BlinkenSend.c             87) 
Stefan Schuermans add IPv6 support to Blinken...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c  88)   // create UDP socket
BlinkenLib/BlinkenSend.c  89)   ipv6 = 0;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c  90)   udpSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
BlinkenLib/BlinkenSend.c  91)   if (udpSocket == INVALID_SOCKET) {
Stefan Schuermans add IPv6 support to Blinken...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c  92)     printf("cannot create IPv4 UDP socket\n");
Christian Heimke BlinkenLib v.0.5.2 (2006-05...

Christian Heimke authored 13 years ago

BlinkenSend.c             93) #ifdef WIN32
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c  94)     WSACleanup();
Christian Heimke BlinkenLib v.0.5.2 (2006-05...

Christian Heimke authored 13 years ago

BlinkenSend.c             95) #endif
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c             96)     return -1;
BlinkenSend.c             97)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c  98)   // loop
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c             99)   loop_cnt = 1;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 100)   for (loop = 0; loop < loop_cnt || loop_cnt == 0; loop++) {
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c            101) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 102)     // print loop message
BlinkenLib/BlinkenSend.c 103)     if (loop_cnt > 1)
BlinkenLib/BlinkenSend.c 104)       printf("--- loop %u/%u ---\n", loop + 1, loop_cnt);
BlinkenLib/BlinkenSend.c 105)     if (loop_cnt == 0)
BlinkenLib/BlinkenSend.c 106)       printf("--- loop %u ---\n", loop + 1);
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            107) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 108)     // process parameters
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            109)     connected = 0;
BlinkenSend.c            110)     proto = BlinkenProtoMcuf;
Christian Heimke BlinkenLib v.0.5.4 (2008-01...

Christian Heimke authored 13 years ago

BlinkenSend.c            111)     maxidle = 3000;
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            112)     send_cnt = 1;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 113)     for (i = 1; i < argCnt; i++) {
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            114) 
Stefan Schuermans add IPv6 support to Blinken...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c 115)       // IPv4
BlinkenLib/BlinkenSend.c 116)       if (strcmp(args[i], "-4") == 0) {
BlinkenLib/BlinkenSend.c 117)         if (ipv6) {
BlinkenLib/BlinkenSend.c 118)           // replace socket with new IPv4 UDP socket
BlinkenLib/BlinkenSend.c 119)           tmpSock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
BlinkenLib/BlinkenSend.c 120)           if (tmpSock != INVALID_SOCKET) {
BlinkenLib/BlinkenSend.c 121)             close(udpSocket);
BlinkenLib/BlinkenSend.c 122)             udpSocket = tmpSock;
BlinkenLib/BlinkenSend.c 123)             ipv6 = 0;
BlinkenLib/BlinkenSend.c 124)           } else {
BlinkenLib/BlinkenSend.c 125)             printf("cannot create IPv4 UDP socket\n");
BlinkenLib/BlinkenSend.c 126)           }
BlinkenLib/BlinkenSend.c 127)         }
BlinkenLib/BlinkenSend.c 128)       }
BlinkenLib/BlinkenSend.c 129)       // IPv6
BlinkenLib/BlinkenSend.c 130)       else if (strcmp(args[i], "-6") == 0) {
BlinkenLib/BlinkenSend.c 131)         if (!ipv6) {
BlinkenLib/BlinkenSend.c 132)           // replace socket with new IPv6 UDP socket
BlinkenLib/BlinkenSend.c 133)           tmpSock = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
BlinkenLib/BlinkenSend.c 134)           if (tmpSock != INVALID_SOCKET) {
BlinkenLib/BlinkenSend.c 135)             close(udpSocket);
BlinkenLib/BlinkenSend.c 136)             udpSocket = tmpSock;
BlinkenLib/BlinkenSend.c 137)             ipv6 = 1;
BlinkenLib/BlinkenSend.c 138)           } else {
BlinkenLib/BlinkenSend.c 139)             printf("cannot create IPv6 UDP socket\n");
BlinkenLib/BlinkenSend.c 140)           }
BlinkenLib/BlinkenSend.c 141)         }
BlinkenLib/BlinkenSend.c 142)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 143)       // source address
Stefan Schuermans add IPv6 support to Blinken...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c 144)       else if (strcmp(args[i], "-s") == 0) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 145)         if (i + 1 < argCnt) {
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            146)           i++;
Stefan Schuermans add IPv6 support to Blinken...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c 147)           if (!ipv6) {
BlinkenLib/BlinkenSend.c 148)             if (!txt2addr(args[i], &addr) ||
BlinkenLib/BlinkenSend.c 149)                 bind(udpSocket, (struct sockaddr *)&addr, sizeof(addr)) != 0)
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 150)               printf("could not set source address to \"%s\"\n", args[i]);
Stefan Schuermans add IPv6 support to Blinken...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c 151)           } else {
BlinkenLib/BlinkenSend.c 152)             if (!txt2addr6(args[i], &addr6) ||
BlinkenLib/BlinkenSend.c 153)                 bind(udpSocket, (struct sockaddr *)&addr6, sizeof(addr6)) != 0)
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 154)               printf("could not set source address to \"%s\"\n", args[i]);
Stefan Schuermans add IPv6 support to Blinken...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c 155)           }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 156)         } else
BlinkenLib/BlinkenSend.c 157)           printf("missing source address for \"-s\"\n");
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c            158)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 159)       // destination address
BlinkenLib/BlinkenSend.c 160)       else if (strcmp(args[i], "-d") == 0) {
BlinkenLib/BlinkenSend.c 161)         if (i + 1 < argCnt) {
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            162)           i++;
Stefan Schuermans add IPv6 support to Blinken...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c 163)           if (!ipv6) {
BlinkenLib/BlinkenSend.c 164)             if (!txt2addr(args[i], &addr) ||
BlinkenLib/BlinkenSend.c 165)                 connect(udpSocket, (struct sockaddr *)&addr,
BlinkenLib/BlinkenSend.c 166)                         sizeof(addr)) != 0)
BlinkenLib/BlinkenSend.c 167)                 printf("could not set destination address to \"%s\"\n",
BlinkenLib/BlinkenSend.c 168)                        args[i]);
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            169)             else
BlinkenSend.c            170)               connected = 1;
Stefan Schuermans add IPv6 support to Blinken...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c 171)           } else {
BlinkenLib/BlinkenSend.c 172)             if (!txt2addr6(args[i], &addr6) ||
BlinkenLib/BlinkenSend.c 173)                 connect(udpSocket, (struct sockaddr *)&addr6,
BlinkenLib/BlinkenSend.c 174)                         sizeof(addr6)) != 0)
BlinkenLib/BlinkenSend.c 175)                 printf("could not set destination address to \"%s\"\n",
BlinkenLib/BlinkenSend.c 176)                        args[i]);
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            177)             else
BlinkenSend.c            178)               connected = 1;
Stefan Schuermans add IPv6 support to Blinken...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c 179)           }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 180)         } else
BlinkenLib/BlinkenSend.c 181)           printf("missing destination address for \"-d\"\n");
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            182)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 183)       // protocol to use
BlinkenLib/BlinkenSend.c 184)       else if (strcmp(args[i], "-p") == 0) {
BlinkenLib/BlinkenSend.c 185)         if (i + 1 < argCnt) {
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            186)           i++;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 187)           if (strcasecmp(args[i], "BLP") == 0)
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            188)             proto = BlinkenProtoBlp;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 189)           else if (strcasecmp(args[i], "EBLP") == 0)
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            190)             proto = BlinkenProtoEblp;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 191)           else if (strcasecmp(args[i], "MCUF") == 0)
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            192)             proto = BlinkenProtoMcuf;
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c            193)           else
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 194)             printf("unknown protocol \"%s\"\n", args[i]);
BlinkenLib/BlinkenSend.c 195)         } else
BlinkenLib/BlinkenSend.c 196)           printf("missing protocol for \"-p\"\n");
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c            197)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 198)       // maximum idle time
BlinkenLib/BlinkenSend.c 199)       else if (strcmp(args[i], "-t") == 0) {
BlinkenLib/BlinkenSend.c 200)         if (i + 1 < argCnt) {
Christian Heimke BlinkenLib v.0.5.4 (2008-01...

Christian Heimke authored 13 years ago

BlinkenSend.c            201)           i++;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 202)           if (sscanf(args[i], "%u", &ui) == 1)
Christian Heimke BlinkenLib v.0.5.4 (2008-01...

Christian Heimke authored 13 years ago

BlinkenSend.c            203)             maxidle = ui;
BlinkenSend.c            204)           else
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 205)             printf("invalid maximum idle time value \"%s\"\n", args[i]);
BlinkenLib/BlinkenSend.c 206)         } else
BlinkenLib/BlinkenSend.c 207)           printf("missing maximum idle time value for \"-t\"\n");
Christian Heimke BlinkenLib v.0.5.4 (2008-01...

Christian Heimke authored 13 years ago

BlinkenSend.c            208)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 209)       // number of times to send movies
BlinkenLib/BlinkenSend.c 210)       else if (strcmp(args[i], "-n") == 0) {
BlinkenLib/BlinkenSend.c 211)         if (i + 1 < argCnt) {
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            212)           i++;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 213)           if (sscanf(args[i], "%u", &ui) == 1 && ui > 0)
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            214)             send_cnt = ui;
BlinkenSend.c            215)           else
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 216)             printf("invalid number \"%s\"\n", args[i]);
BlinkenLib/BlinkenSend.c 217)         } else
BlinkenLib/BlinkenSend.c 218)           printf("missing number for \"-n\"\n");
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c            219)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 220)       // read movie and send it
BlinkenLib/BlinkenSend.c 221)       else if (strcmp(args[i], "-i") == 0) {
BlinkenLib/BlinkenSend.c 222)         if (i + 1 < argCnt) {
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            223)           i++;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 224)           if (!connected)       // try to connect if not yet connected
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            225)           {
Stefan Schuermans add IPv6 support to Blinken...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenSend.c 226)             if (!ipv6) {
BlinkenLib/BlinkenSend.c 227)               printf("no destination address to sent movie \"%s\" to,\n"
BlinkenLib/BlinkenSend.c 228)                      "  using default destination address \"127.0.0.1:2323\"\n",
BlinkenLib/BlinkenSend.c 229)                      args[i]);
BlinkenLib/BlinkenSend.c 230)               if (!txt2addr("127.0.0.1:2323", &addr) ||
BlinkenLib/BlinkenSend.c 231)                   connect(udpSocket, (struct sockaddr *)&addr,
BlinkenLib/BlinkenSend.c 232)                           sizeof(addr)) != 0)
BlinkenLib/BlinkenSend.c 233)                 printf("could not set destination address to \"127.0.0.1:2323\"\n");
BlinkenLib/BlinkenSend.c 234)               else
BlinkenLib/BlinkenSend.c 235)                 connected = 1;
BlinkenLib/BlinkenSend.c 236)             } else {
BlinkenLib/BlinkenSend.c 237)               printf("no destination address to sent movie \"%s\" to,\n"
BlinkenLib/BlinkenSend.c 238)                      "  using default destination address \"[::1]:2323\"\n",
BlinkenLib/BlinkenSend.c 239)                      args[i]);
BlinkenLib/BlinkenSend.c 240)               if (!txt2addr6("[::1]:2323", &addr6) ||
BlinkenLib/BlinkenSend.c 241)                   connect(udpSocket, (struct sockaddr *)&addr6,
BlinkenLib/BlinkenSend.c 242)                           sizeof(addr6)) != 0)
BlinkenLib/BlinkenSend.c 243)                 printf("could not set destination address to \"[::1]:2323\"\n");
BlinkenLib/BlinkenSend.c 244)               else
BlinkenLib/BlinkenSend.c 245)                 connected = 1;
BlinkenLib/BlinkenSend.c 246)             }
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            247)           }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 248)           if (connected) {
BlinkenLib/BlinkenSend.c 249)             pMovie = BlinkenMovieLoad(args[i]);
BlinkenLib/BlinkenSend.c 250)             if (pMovie == NULL)
BlinkenLib/BlinkenSend.c 251)               printf("could not read movie \"%s\"\n", args[i]);
BlinkenLib/BlinkenSend.c 252)             else {
BlinkenLib/BlinkenSend.c 253)               printf("movie \"%s\" read\n", args[i]);
BlinkenLib/BlinkenSend.c 254)               for (ui = 0; ui < send_cnt; ui++) {
BlinkenLib/BlinkenSend.c 255)                 printf("sending movie \"%s\" (%u/%u)...\n", args[i], ui + 1,
BlinkenLib/BlinkenSend.c 256)                        send_cnt);
BlinkenLib/BlinkenSend.c 257)                 BlinkenMovieSend(pMovie, udpSocket, proto, maxidle);
BlinkenLib/BlinkenSend.c 258)                 printf("movie \"%s\" sent\n", args[i]);
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            259)               }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 260)               BlinkenMovieFree(pMovie);
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            261)             }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 262)           } else
BlinkenLib/BlinkenSend.c 263)             printf("no destination address to sent movie \"%s\" to\n",
BlinkenLib/BlinkenSend.c 264)                    args[i]);
BlinkenLib/BlinkenSend.c 265)         } else
BlinkenLib/BlinkenSend.c 266)           printf("missing input filename for \"-i\"\n");
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            267)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 268)       // number of times to loop
BlinkenLib/BlinkenSend.c 269)       else if (strcmp(args[i], "-l") == 0) {
BlinkenLib/BlinkenSend.c 270)         if (i + 1 < argCnt) {
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            271)           i++;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 272)           if (sscanf(args[i], "%u", &ui) == 1)
Christian Heimke BlinkenLib v.0.4.1 (2005-12...

Christian Heimke authored 13 years ago

BlinkenSend.c            273)             loop_cnt = ui;
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c            274)           else
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 275)             printf("invalid number \"%s\"\n", args[i]);
BlinkenLib/BlinkenSend.c 276)         } else
BlinkenLib/BlinkenSend.c 277)           printf("missing number for \"-l\"\n");
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c            278)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 279)       // unknown parameter
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c            280)       else
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 281)         printf
BlinkenLib/BlinkenSend.c 282)             ("unknown parameter \"%s\", call without parameters to get help\n",
BlinkenLib/BlinkenSend.c 283)              args[i]);
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c            284) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 285)     }   // for( i ...
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c            286) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 287)   }     // for( loop ...
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c            288) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 289)   // close socket
BlinkenLib/BlinkenSend.c 290)   close(udpSocket);
Christian Heimke BlinkenLib v.0.4 (2005-07-02)

Christian Heimke authored 13 years ago

BlinkenSend.c            291) 
Christian Heimke BlinkenLib v.0.5.2 (2006-05...

Christian Heimke authored 13 years ago

BlinkenSend.c            292) #ifdef WIN32
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenSend.c 293)   WSACleanup();
Christian Heimke BlinkenLib v.0.5.2 (2006-05...

Christian Heimke authored 13 years ago

BlinkenSend.c            294) #endif