MCPcopy Create free account
hub / github.com/apache/trafficserver / marshal_len

Method marshal_len

src/proxy/logging/LogField.cc:440–480  ·  view source on GitHub ↗

------------------------------------------------------------------------- LogField::marshal_len This routine will find the marshalling length (in bytes) for this field, given a LogAccess object. It does this by using the property of the marshalling routines that if the marshal buffer is NULL, only the size requirement is returned. -----------------------------------------------------

Source from the content-addressed store, hash-verified

438 requirement is returned.
439 -------------------------------------------------------------------------*/
440unsigned
441LogField::marshal_len(LogAccess *lad)
442{
443 if (m_container == NO_CONTAINER) {
444 return (lad->*m_marshal_func)(nullptr);
445 }
446
447 switch (m_container) {
448 case CQH:
449 case PSH:
450 case PQH:
451 case SSH:
452 case CSSH:
453 return lad->marshal_http_header_field(m_container, m_name, nullptr);
454
455 case ECQH:
456 case EPSH:
457 case EPQH:
458 case ESSH:
459 case ECSSH:
460 return lad->marshal_http_header_field_escapify(m_container, m_name, nullptr);
461
462 case ICFG:
463 return lad->marshal_config_int_var(m_name, nullptr);
464
465 case SCFG:
466 return lad->marshal_config_str_var(m_name, nullptr);
467
468 case RECORD:
469 return lad->marshal_record(m_name, nullptr);
470
471 case MS:
472 return lad->marshal_milestone(m_milestone1, nullptr);
473
474 case MSDMS:
475 return lad->marshal_milestone_diff(m_milestone1, m_milestone2, nullptr);
476
477 default:
478 return 0;
479 }
480}
481
482bool
483LogField::isContainerUpdateFieldSupported(Container container)

Callers 3

logMethod · 0.80
toss_this_entryMethod · 0.80
resolve_logfield_stringFunction · 0.80

Calls 8

marshal_recordMethod · 0.80
marshal_milestoneMethod · 0.80
typeMethod · 0.45

Tested by

no test coverage detected