Changeset ef55d05 for lib/format_erf.c


Ignore:
Timestamp:
08/04/05 16:16:12 (16 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
77bd94f
Parents:
9e2a109
Message:

Added more help info - fixed major rtserver bug - added a little more documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_erf.c

    r9e2a109 ref55d05  
    314314        // extract conn_info from uridata
    315315        if (strlen(uridata) == 0) {
    316                 libtrace->format_data->conn_info.rt.hostname =
    317                         strdup("localhost");
    318                 libtrace->format_data->conn_info.rt.port = COLLECTOR_PORT;
     316                libtrace->conn_info.rt.hostname = NULL;
     317                libtrace->conn_info.rt.port = COLLECTOR_PORT;
    319318        }
    320319        else {
    321320                if ((scan = strchr(uridata,':')) == NULL) {
    322                         libtrace->format_data->conn_info.rt.hostname =
    323                                 strdup(uridata);
    324                         libtrace->format_data->conn_info.rt.port =
    325                                 COLLECTOR_PORT;
     321                        libtrace->conn_info.rt.hostname =
     322                                NULL;
     323                        libtrace->conn_info.rt.port =
     324                                atoi(uridata);
    326325                } else {
    327326                        libtrace->format_data->conn_info.rt.hostname =
     
    647646                fifo_out_update(libtrace->fifo, size);
    648647                fifo_ack_update(libtrace->fifo, size);
     648                return numbytes;
    649649        } while(1);
    650650}
     
    706706}
    707707
    708 static size_t erf_set_capture_length(struct libtrace_packet_t *packet, const size_t size) {
     708static size_t erf_set_capture_length(struct libtrace_packet_t *packet, size_t size) {
    709709        dag_record_t *erfptr = 0;
    710710        assert(packet);
     
    737737        printf("\terf:/path/to/file\t(uncompressed)\n");
    738738        printf("\terf:/path/to/file.gz\t(gzip-compressed)\n");
    739         printf("\terf:-\t(stdin, either compressed or not)\n")/
     739        printf("\terf:-\t(stdin, either compressed or not)\n");
    740740        printf("\terf:/path/to/socket\n");
    741741        printf("\n");
     
    743743        printf("\n");
    744744        printf("Supported output URIs:\n");
    745         printf("\tnone\n");
    746         printf("\n");
    747 
     745        printf("\terf:path/to/file\t(uncompressed)\n");
     746        printf("\terf:/path/to/file.gz\t(gzip-compressed)\n");
     747        printf("\terf:-\t(stdout, either compressed or not)\n");
     748        printf("\n");
     749        printf("\te.g.: erf:/tmp/trace\n");
     750        printf("\n");
     751        printf("Supported output options:\n");
     752        printf("\t-z\tSpecify the gzip compression, ranging from 0 (uncompressed) to 9 - defaults to 1\n");
     753        printf("\n");
     754
     755       
    748756}
    749757
     
    752760        printf("Supported input URIs:\n");
    753761        printf("\trtclient:hostname:port\n");
    754         printf("\trtclient:port\n");
     762        printf("\trtclient:hostname (connects on default port)\n");
    755763        printf("\n");
    756764        printf("\te.g.: rtclient:localhost\n");
     
    758766        printf("\n");
    759767        printf("Supported output URIs:\n");
     768        printf("\trtclient: \t(will output on default port on all available IP addresses) \n");
     769        printf("\trtclient:hostname:port\n");
    760770        printf("\trtclient:port\n");
    761771        printf("\n");
    762772        printf("\te.g.: rtclient:32500\n");
     773        printf("\te.g.: rtclient:\n");
    763774        printf("\n");
    764775
Note: See TracChangeset for help on using the changeset viewer.