Wireless sensor network technology has found diverse applications in numerous fields. As the networking technology is refined in many ways, the need for system modulation with effective performance becomes essential. A multitude of architectures, which includes system abstraction and layering, has been proposed to solve the need at the operating system level. However, previous efforts do not qualify for networking architecture required by sensor networking, since they are aimed at hardware abstraction or protocol-based layering. In this paper, we classify developers into kernel, network and application developers and propose a network architecture that enables those developers to program independently. Network stack is separated into three different layers; MLL, NSL, DNL. This three-layered architecture provides an effective programming environment to sensor network developers by minimizing modification of other layers and maximizing reusability of the networking module. To validate the proposed mechanism, we implemented and assessed the performance with a few network algorithms and applications, based on the RETOS, which supports a dynamic loadable kernel module.