Figure 2: Home gateway function and structure