def build_flat_msg(self,<EOL>id=None,<EOL>msg=None):
flat_msg = {}<EOL>if not id:<EOL><INDENT>log.error("<STR_LIT>")<EOL>return None<EOL><DEDENT>if not msg:<EOL><INDENT>log.error("<STR_LIT>")<EOL>return None<EOL><DEDENT>for k in msg["<STR_LIT:data>"]:<EOL><INDENT>if k == "<STR_LIT>":<EOL><INDENT>flat_msg.update(self.process_ether_frame(<EOL>id=id,<EOL>msg=msg["<STR_LIT:data>"][k]))<EOL><DEDENT>elif k == "<STR_LIT>":<EOL><INDENT>flat_msg.update(self.process_ip_frame(<EOL>id=id,<EOL>msg=msg["<STR_LIT:data>"][k]))<EOL><DEDENT>elif k == "<STR_LIT>":<EOL><INDENT>flat_msg.update(self.process_ipvsix_frame(<EOL>id=id,<EOL>msg=msg["<STR_LIT:data>"][k]))<EOL><DEDENT>elif k == "<STR_LIT>":<EOL><INDENT>flat_msg.update(self.process_tcp_frame(<EOL>id=id,<EOL>msg=msg["<STR_LIT:data>"][k]))<EOL><DEDENT>elif k == "<STR_LIT>":<EOL><INDENT>flat_msg.update(self.process_udp_frame(<EOL>id=id,<EOL>msg=msg["<STR_LIT:data>"][k]))<EOL><DEDENT>elif k == "<STR_LIT>":<EOL><INDENT>flat_msg.update(self.process_dns_frame(<EOL>id=id,<EOL>msg=msg["<STR_LIT:data>"][k]))<EOL><DEDENT>elif k == "<STR_LIT>":<EOL><INDENT>flat_msg.update(self.process_icmp_frame(<EOL>id=id,<EOL>msg=msg["<STR_LIT:data>"][k]))<EOL><DEDENT>elif k == "<STR_LIT>":<EOL><INDENT>flat_msg.update(self.process_arp_frame(<EOL>id=id,<EOL>msg=msg["<STR_LIT:data>"][k]))<EOL><DEDENT>elif k == "<STR_LIT>":<EOL><INDENT>flat_msg.update(self.process_raw_frame(<EOL>id=id,<EOL>msg=msg["<STR_LIT:data>"][k]))<EOL><DEDENT>elif k == "<STR_LIT>":<EOL><INDENT>flat_msg.update(self.process_pad_frame(<EOL>id=id,<EOL>msg=msg["<STR_LIT:data>"][k]))<EOL><DEDENT>else:<EOL><INDENT>log.error(("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL>.format(k,<EOL>ppj(msg["<STR_LIT:data>"][k]),<EOL>msg["<STR_LIT:data>"]))<EOL><DEDENT><DEDENT>return flat_msg<EOL>
build_flat_msg

        :param id: unique id for this message
        :param msg: message dictionary to flatten