Excluding packet's information from the control plane

Hello guys,
I want to exclude some information of a packet which has been sent to the control plane such as ip source or destination, mac address etc. I am thinking to do it using bit manipulation in the packet.
Is there some easier way to do this in the control plane?
Also i want to change and the packet fields before send it again to the data plane.