def replace_params(ethernet, params=[]):
    """Replace parameters of Ethernet, TCP and/or IP packet

    Args:
        ethernet (str): Ethernet packet
        params (dict): packet parameters

    Returns:
        dpkt.Ethernet: Ethernet packet including IP and TCP data
    """
    if 'tcp' in params:
        for field in params['tcp']:
            setattr(ethernet.data.data, field, params['tcp'][field])
    if 'ip' in params:
        for field in params['ip']:
            setattr(ethernet.data, field, params['ip'][field])
    if 'ethernet' in params:
        for field in params['ethernet']:
            setattr(ethernet, field, params['ethernet'][field])
