Real-time systems connected through packet networks belong to the family of networked control systems, and they can be easily destabilized by communication delay and packet losses, when they are not properly compensated. The largest part of the solutions available in the literature are mainly based on control and system theory where the parameters of the network are assumed to be given. This classical approach could be improved by designing at the same time the network, e.g., by introducing quality-of-service guarantees as currently done in teleconference applications. Such control/network co-design needs a simulation framework where both aspects are properly and jointly addressed. The paper addresses this topic starting from the discussion of its critical issues, and then proposing an accurate co-simulation tool based on SystemC and Matlab/Simulink. SystemC will be used for the network simulation and protocol design whereas Matlab/Simulink for plant modeling and control design.