+
+ /* write comment string if applicable */
+ if ((comment != NULL) && (strlen(comment) > 0) && (strlen(comment) < G_MAXUINT16)) {
+ option.type = OPT_COMMENT;
+ option.value_length = (guint16)(strlen(comment) + 1);
+ WRITE_DATA(fp, &option, sizeof(struct option), *bytes_written, err);
+ WRITE_DATA(fp, comment, strlen(comment) + 1, *bytes_written, err);
+ if ((strlen(comment) + 1) % 4) {
+ WRITE_DATA(fp, &padding, 4 - (strlen(comment) + 1) % 4 , *bytes_written, err);
+ }
+ }
+
+ if (isb_starttime !=0) {
+ option.type = ISB_STARTTIME;
+ option.value_length = sizeof(guint64);
+ counter = stats.ps_recv;
+ WRITE_DATA(fp, &option, sizeof(struct option), *bytes_written, err);
+ WRITE_DATA(fp, &isb_starttime, sizeof(guint64), *bytes_written, err);
+ }
+ if (isb_endtime) {
+ option.type = ISB_ENDTIME;
+ option.value_length = sizeof(guint64);
+ counter = stats.ps_recv;
+ WRITE_DATA(fp, &option, sizeof(struct option), *bytes_written, err);
+ WRITE_DATA(fp, &isb_endtime, sizeof(guint64), *bytes_written, err);
+ }