netadm Development of Project. jeho-park, netadm@kernelproject.org v0.1, 15. feb 2006 GPL version 2. netadm Development of Project. -------------------------------------------------------------------------------------- Subject 1. Introduction. 2. Description of source directory 3. General Structs. 4. How to additon Function in Program. 5. IPC 6. Coding Style. 7. Additon Library -------------------------------------------------------------------------------------- 1. Introduction. This Paper is written for developer who take part participate in netadm project first. And it is describe from netadm project's source struct to each coded module structs until now. And it wil help you adapt to netadm project. In addition it explains external library which is written for netadm project some purposes and coding style to newer participated development. And it is written for succeeding and expanding codes with consistency. Lastly, it leads convenience project activity. 2. Explaination of Source Directory. Now, netadm project is managing and development "gwc program", and gwc's main function is monitoring, Qos, and flow control. Below picture is source directory's struct. /gwc +------- /doc: Reference Document. | +------- /elib: External Library for gwc. | and it is managed precompiled archive. | +------- /gwcadmd: This Daemon is provide for wireless functions. | If you didn't configure at install time, | any action isn't happen. Just It is loopping. | | If you configure at install time, This Daemon classifies | wireless 802.11a/b/g, updates related infomations, and | controls wireless signal power modules. | +------- /gwccli: cli command | +------- /gwcguid: GUI Daemon, The lower part will be provide detail contents. | +------- /gwclib: External Library, The lower part will be provide detail contents. | +------- /include: Header file, it is correspond with gwclib source. | The lower part will be provide detail contents. | +------- /pf: This kernel module define nfhook handler which is related packet filtering. | +------- /scripts: Install script(install.sh), Operation script(gwc), If you intall default configuration, system will copy syslog config file. In install time, SNMP config and Mib file will be installed, this SNMP config and MIB file compressed gzip file is here. In gwc case, below contents rule classify header and source file. [Header File] h1. This header defines external data structs. h2. This header defines global configuration and Paths. h3. This header defines string type message. h4. This header defines export frequently used Library Function, but it is no relation with program's character. h5. This header defines declaration of program's main function procedure and exported header. h6. This header defines data struct, and macro for Daemon program, which is independent other program. [Source File] c4. This Source is related h4 header, and it is declaring function. c5. This Source is related h5 header, and it is declaring principal function procedure. d1. This Source is related Daemon's main rutin. Below Contents explain gwc's real source unit by above rule. [Header File] h1. This header defines external data structs. Path: include File: sysdef.h, sysshm.h Detail contents: sysdef.h: declaration of object sysshm.h: declatation of object in sysdef.h is consisted a data structs, and it is accessed from shared memory globaly. h2. This header defines global configuration and paths. Path: include File: global.h Detail contents: global.h: it is declaring decided some macro variables at compile time. this variable is related with global promise over the system. for example, system start and exit script's path. internal program, which is referencing external path. Package version Info. Tempfile's path for IPC use. h3. This header defines string type message Path: include File: message.h Detail contents: message.h: declaration of string in external use. for example cli command's help-message, internal processing error-message. h4. This header defines export frequently used Library Function, but it is no relation with program's character. Path: include File: confio.h, confutil.h, slog.h, sysioctl.h, sysipc.h, sysnio.h, syssnmp.h, systime.h, sysutil.h Detail contents: confio.h: declare save, load functionality function for configuration file. confutil.h: declare utility function which is related with IPCs. slog.h: convenience of development for syslog. sysioctl.h: convenience of development for bsd socket library header. syssnmp.h: snmp library. systime.h: timing and timer library sysutil.h: it is used for system global library, but it is not concerned with above contents. h5. This header defines declaration of program's main function procedure and exported header. Path: include File: confproc.h Detail contents: If cli command and gui request whth IPC, this rutin process internal requests. h6. This header defines data struct, and macro for Daemon program, which is independent other program. Path: gwcguid File: apc.h, callback.h, dump.h, fwc,h, interface.h, qos.h, support.h Detail contents: apc.h: it contains monitoring UI rutin in GUI daemon and data structure. callback.h: this header is related with callback function in GUI daemon. dump.h: It is not used, now. fwc.h: it contains flow control UI rutin and data structure in GUI daemon. interface.h: this header contains main rutin in GUI qos.h: this header contains QOS UI rutin and data structure. support.h: this header is used for internal processing callback function, and this file is maked by glade tool