def getIfConfig(self):
conf = {}<EOL>try:<EOL><INDENT>out = subprocess.Popen([ipCmd, "<STR_LIT>", "<STR_LIT>"], <EOL>stdout=subprocess.PIPE).communicate()[<NUM_LIT:0>]<EOL><DEDENT>except:<EOL><INDENT>raise Exception('<STR_LIT>' % ipCmd)<EOL><DEDENT>for line in out.splitlines():<EOL><INDENT>mobj = re.match('<STR_LIT>', line)<EOL>if mobj:<EOL><INDENT>iface = mobj.group(<NUM_LIT:1>)<EOL>conf[iface] = {}<EOL>continue<EOL><DEDENT>mobj = re.match('<STR_LIT>', line)<EOL>if mobj:<EOL><INDENT>arr = mobj.group(<NUM_LIT:1>).split()<EOL>if len(arr) > <NUM_LIT:0>:<EOL><INDENT>conf[iface]['<STR_LIT:type>'] = arr[<NUM_LIT:0>]<EOL><DEDENT>if len(arr) > <NUM_LIT:1>:<EOL><INDENT>conf[iface]['<STR_LIT>'] = arr[<NUM_LIT:1>]<EOL><DEDENT>continue<EOL><DEDENT>mobj = re.match('<STR_LIT>', line)<EOL>if mobj:<EOL><INDENT>proto = mobj.group(<NUM_LIT:1>)<EOL>if not conf[iface].has_key(proto):<EOL><INDENT>conf[iface][proto] = []<EOL><DEDENT>addrinfo = {}<EOL>addrinfo['<STR_LIT>'] = mobj.group(<NUM_LIT:2>).lower()<EOL>addrinfo['<STR_LIT>'] = int(mobj.group(<NUM_LIT:3>))<EOL>arr = mobj.group(<NUM_LIT:4>).split()<EOL>if len(arr) > <NUM_LIT:0> and arr[<NUM_LIT:0>] == '<STR_LIT>':<EOL><INDENT>addrinfo['<STR_LIT>'] = arr[<NUM_LIT:1>]<EOL><DEDENT>conf[iface][proto].append(addrinfo)<EOL>continue<EOL><DEDENT><DEDENT>return conf<EOL>
Return dictionary of Interface Configuration (ifconfig).

        @return: Dictionary of if configurations keyed by if name.