+ options ? options : "", lease);
+
+ if (verbose)
+ printf("[%02d:%02d:%02d] %s", curdate->tm_hour, curdate->tm_min,
+ curdate->tm_sec, packet);
+
+ if (sendto(sock, packet, strlen(packet), 0,
+ (struct sockaddr *)&addr, sizeof(addr)) < 0)
+ perror("Unabled to send packet");
+ }
+ }
+
+
+ for (i = 0, pclass = 0; pclass < num_pclasses; pclass ++)
+ {
+ for (server = 0; server < num_servers; server ++, i ++)
+ {
+ if (i == count)
+ {
+ seconds --;
+ i = 0;
+ sleep(1);
+ curtime = time(NULL);
+ curdate = localtime(&curtime);
+ }
+
+ snprintf(packet, sizeof(packet),
+ "%x %x ipp://testserver-%d/classes/class-%s-%d \"Server Room %d\" "
+ "\"Test Class %d\" \"Acme Blazer 2000\"%s%s "
+ "lease-duration=%d\n",
+ CUPS_PRINTER_REMOTE | CUPS_PRINTER_CLASS, IPP_PRINTER_IDLE,
+ server + 1, names[pclass % 26], pclass / 26 + 1, server + 1,
+ pclass + 1, options ? " ipp-options=" : "",
+ options ? options : "", lease);