We focus on implementing a modified TCP/IP protocol stack by positioning network coding functionalities in the form of a new layer in between the transport and the network layer, thereby allowing incremental deployment. We implement this proposed modification for the TCP/IP stack in the OPNET Modeler and analyze implemented functionalities for heterogeneous wireless environments where a mobile user can connect to both LTE (Long Term Evolution) and WLAN (wireless LAN). In this context, we simulate various user-network association policies in such heterogeneous wireless environments with the goal of usage cost optimization under a Quality of Service (QoS) constraints. To this end we implement off-line and online decision policies in the OPNET Modeler and compare them in terms of throughput and usage cost. The results show that the network usage cost can be improved significantly by using a threshold-based online policy while remaining within the user’s QoS requirements.