File: TODO

package info (click to toggle)
librudiments0 0.27-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,528 kB
  • ctags: 2,284
  • sloc: cpp: 14,657; sh: 7,547; ansic: 2,664; makefile: 945; xml: 15
file content (390 lines) | stat: -rw-r--r-- 10,681 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
fix math class
wrap shm_open/shm_unlink somewhere
move sleep methods into another class

file class:
	need static versions of create methods
	move create*Link/resolveSymbolicLink into link class

can getData methods in dict/linkedlist classes be const?
a bunch of static methods can probably be inlined

freebsd IPV6_V6ONLY??? socket option
sysctl on netbsd?

should be able to associate a zlib handle with a file descriptor and read/write
	compressed data, just like ssl
	
probably can combine memorypool and variablebuffer classes
memorypool actually just works the same way that malloc tends to work, I'm not
	sure using it nets anything

xml:
	dtd class needs to store +/* child element modifiers
	should be able to validate an xml document against the dtd
	bug in xml comment parsing, ! gets prepended to value
	xmldom should support xpath
	xmldomnode should probably use list class
	test invalid xml
	handle CDATA/internal subsets better
	is xmldom really DOM compliant?
	xml classes need to support entities defined in the DOCTYPE declaration

implement these classes:
	directorylisting
	link
	pipe
	serialport
	tty
	pseudotty
	shellcommand
	process
	system
	loginrecord
	messagequeue
	thread
	sslcontext
	table (dynamic 2d array)
	generic parser/lexer classes, use them for xmlsax

tests for:
	intervaltimer
	dynamiclib
	math
	rawbuffer
	memorymap
	mutex
	serialportprofile

need to use internally:
	rawbuffer class intstead of mem*()
	memorymap class intstead of mmap*()
	mutex class instead of pthread_mutex_*()

get a mingw port working

--------------------------------------------------------------------------------

modemutil
serialportutil
inetsocketutil
	- sockaddrin
	- addr
	- port
rawsocketutil
fileutil
unixsocketutil
	- sockaddrun
	- file
msgqueueutil
shmutil
fifoutil
pipeutil

filedescriptor
	- read()
	- write()
	- close()
	file : filedescriptor
		- open(filename,...)
		device : file
		serialport : file
		fifo : file
	pipe : filedescriptor
	client : filedescriptor
		- initialize(namevaluepairs *nvp)=0
		- connect=0
		modemclient : client, modemutil
			- initialize(namevaluepairs *nvp)=0
			- initialize(device,initstring,dialstring,...)
			- connect()
			- connect(device,initstring,dialstring,...)
		serialportclient : client, serialportutil
			- initialize(namevaluepairs *nvp)=0
			- initialize(device,...)
			- connect()
			- connect(device,...)
		socketclient : client
			- nonblock()
			protected:
				- connect(...,timeout)
			inetsocketclient : socketclient, inetsocketutil
				- initialize(namevaluepairs *nvp)=0
				- initialize(host,port,...)
				- connect()
				- connect(host,port,...)
			unixsocketclient : socketclient, unixsocketutil
				- initialize(namevaluepairs *nvp)=0
				- initialize(filename,...)
				- connect()
				- connect(filename,...)
			rawsocketclient : client, rawsocketutil
				- initialize(namevaluepairs *nvp)=0
				- initialize(???,...)
				- connect()
				- connect(???,...)
		fileclient  : client, fileutil
			- initialize(namevaluepairs *nvp)=0
			- initialize(filename,...)
			- connect()
			- connect(filename,...)
		msgqueueclient : client, msgqueueutil
			- initialize(namevaluepairs *nvp)=0
			- initialize(key,...)
			- connect()
			- connect(key,...)
		shmclient : client, shmutil
			- initialize(namevaluepairs *nvp)=0
			- initialize(key,...)
			- connect()
			- connect(key,...)
		fifoclient : client, fifoutil
			- initialize(namevaluepairs *nvp)=0
			- initialize(filename,...)
			- connect()
			- connect(filename,...)
		pipeclient : client, pipeutil
			- initialize(namevaluepairs *nvp)=0
			- initialize(???,...)
			- connect()
			- connect(???,...)
		...
	server : filedescriptor
		- bind()=0
		- listen()=0
		- filedescriptor *accept()=0
		modemserver: server, modemutil
			- initialize(device,initstring,...)
			- bind()
			- listen()
			- filedescriptor *accept()
			- listen(device,initstring,...)
		serialportserver: server, serialportutil
			- initialize(device,...)
			- bind()
			- listen()
			- filedescriptor *accept()
			- listen(device,...)
		socketserver: server
			- linger()
			- reuseaddr()
			- nonblock()
			- listen()
			protected:
				- sslAccept()
			inetsocketserver: socketserver, inetsocketutil
				- initialize(addr,port,...)
				- bind()
				- filedescriptor *accept()
				- listen(addr,port,...)
			unixsocketserver: socketserver, unixsocketutil
				- initialize(filename,...)
				- bind()
				- filedescriptor *accept()
				- listen(filename,...)
			rawsocketserver: server, rawsocketutil
				- initialize(???,...)
				- bind()
				- filedescriptor *accept()
				- listen(???,...)
		fileserver: server, fileutil
			- initialize(filename,...)
			- bind()
			- listen()
			- filedescriptor *accept()
			- listen(filename,...)
		msgqueueserver: server, msgqueueutil
			- initialize(key,...)
			- bind()
			- listen()
			- filedescriptor *accept()
			- listen(key,...)
		shmserver: server, shmutil
			- initialize(key,...)
			- bind()
			- listen()
			- filedescriptor *accept()
			- listen(key,...)
		fifoserver: server, fifoutil
			- initialize(filename,...)
			- bind()
			- listen()
			- filedescriptor *accept()
			- listen(filename,...)
		pipeserver: server, pipeutil
			- initialize(???,...)
			- bind()
			- listen()
			- filedescriptor *accept()
			- listen(???,...)
		...

--------------------------------------------------------------------------------

charstring class:
	stdlib.h - strtoul(_l)() - string to ulong
		strto(ull|uq)(_l)() - string to unsigned long long
	stdio.h - sprintf()
	string.h/strings.h -
		strxfrm(_l)()
		strcspn(),strspn(),strpbrk()
	wordexp.h - wordexp()/wordfree() - word expansion???
	gnu extensions -
		stdio.h - asprintf(), open_memstream(), obstack_printf()
		obstack.h - lots of object stack macros for
				building strings char at a time
	not in bsd - 
		monetary.h - strfmon(_l)()

filesystem class:
	bsd/linux only (solaris uses an ioctl) - 
		sys/quota.h - quotactl() function, macros, defines
	bsd/linux only - 
		fstab.h - /etc/fstab parser
			getfsent(),getfsspec(),getfsfile(),setfsent(),endfsent()
	sunos/linux only - 
		mntent.h - read/write fstab, mtab, etc.
				setmntent(),getmntent(_r)()
				addmntent(),endmntent(),hasmntopt()
	linux only -
		sys/mount.h - mount(),umount(),umount2()

commandline class:
	getopt.h - make sure commandline class has full functionality
			getopt(),getopt_long(),getopt_long_only()

datetime class:
	time.h - difftime()

timer class:
	not on many systems -
		time.h and sys/time.h -
				clock_getres(), clock_gettime(), clock_settime()
				clock_nanosleep(), clock_getcpuclockid()
				timer_create(), timer_delete(), timer_settime(),
				timer_gettime(), timer_getoverrun()
					CLOCK_REALTIME
					CLOCK_MONOTONIC
					CLOCK_PROCESS_CPUTIME_ID
					CLOCK_THREAD_CPUTIME_ID

filedescriptor class:
	fcntl.h - fcntl()
			F_GET/SETFD - get/set close-on-exec bit
			F_GET/SETFL - get/set flags
				O_APPEND,O_NONBLOCK,O_ASYNC,O_DIRECT
			F_GET/SETOWN - get/set process group that will receive
					signals on i/o availability
			F_GET/SETSIG - get/set what signal to send to process
					group on i/o/availability
	sys/select.h - select(),pselect()
	sys/ioctl.h - ioctl()
	sys/poll.h - poll()
	sys/uio.h - readv()/writev()
	gnu extensions - 
		stdio.h - dprintf()
	linux only - 
		sys/sendfile.h - sendfile()
	not in many systems - 
		sys/epoll.h - epoll functions for speeding up network io
				epoll_create(),epoll_ctl(),epoll_wait()
		aio.h - aio_init(),aio_read(),aio_write(),lio_listio(),
			aio_error(),aio_return(),aio_cancel(),
			aio_suspend(),aio_fsync()

errors:
	stdio.h - perror()
	string.h - strerror(_r)()

signals:
	stdlib.h - abort(), atexit(), exit(), _Exit()
	string.h - strsignal()
	unistd.h - pause(), _exit()
	setjmp.h - setjmp()/longjump()/sigsetjump() - save stack contexts
	signal.h - signal stuff - need to implement more of this
			sysv_signal(),bsd_signal(),signal()
			kill(),killpg(),raise()
			ssignal(),gsignal()
			psignal()
			sigpause(),sigblock()
			sigsetmask(),siggetmask()
			sigemptyset(),sigfillset(),sigaddset(),sigdelset()
			sigismember(),sigisemptyset(),sigandset,sigorset()
			sigprocmask(),sigaction(),sigpending(),sigwait(),
			sigwaitinfo(),sigtimedwait(),sigqueue()
			sigvec(),sigreturn(),siginterrupt(),
			sigstack(),signalstack()
			sighold(),sigrelse(),sigignore(),sigset()
	sys/wait.h - wait(),wait3(),wait4(),waitpid()
	not in many systems - 
		stdlib.h - on_exit()
		sys/wait.h - waitid()

catalogs ???:
	nl_types.h - catopen()/catgets()/catclose()

network:
	unistd.h - gethostname()/sethostname()
	netdb.h - netgroup functions
			herror(),hstrerror()
			rcmd(_af)(),rexec(_af)(),ruserok(_af)(),rresvport(_af)()
			gai_strerror(),getnameinfo(),getaddrinfo_a(),
	resolv.h - resolver functions, lots of these
	sys/socket.h - socket(),socketpair(),
			getsockname(),getpeername(),
			bind(),listen(),accept(),
			connect(),
			send(),recv(),
			sendto(),recvfrom(),
			sendmsg(),recvmsg(),
			getsockopt(),setsockopt(),
			shutdown()
	net/if.h - physical interface structs/defines
	net/if_arp.h - arp protocol structs/defines
	net/route.h - routing structs/defines
	netinet/in.h - ntohl,ntohs,htoln,htons
	netinet/icmp6.h - icmp structs
	netinet/if_ether.h - more arp structs???
	netinet/igmp.h - igmp structs???
	netinet/tcp.h - #defines for setsockopt, tcp packet structs
	netinet/udp.h - udp packet structs

	not on solaris -
		unistd.h - getdomainname()/setdomainname()
		netdb.h - gai_suspend(),gai_error(),gai_cancel()
		ifaddrs.h - discover network interfaces
				getifaddrs(),freeifaddrs()
		net/if_packet.h - packet sockets structs/defines
		net/if_ppp.h - ppp interfaces structs/defines
		netinet/in.h - ip/ipv6 address structs,
				bindresvport(),bindresvport6()
				inet6_option_space()
				inet6_option_init()
				inet6_option_append()
				inet6_option_alloc()
				inet6_option_next()
				inet6_option_find()
		netinet/ip.h - ip packet structs
		netinet/ip6.h - ipv6 packet structs
		netinet/ip_icmp.h - icmp packet structs
	not on many systems -
		sys/socket.h - sockatmark()
		net/ethernet.h - ethernet interface structs/defines
		net/if_shaper.h - traffic shaper structs/defines
		net/if_slip.h - slip interfaces structs/defines
		netinet/if_fddi.h - fddi packet struct???
		netinet/if_tr.h - ???
		netinet/ether.h - ethernet addresses to acii and back
					ether_ntoa(_r)()
					ether_aton(_r)()
					ether_ntohost()
					ether_hostton()
					ether_line()
		netpacket/packet.h - raw packet structs

internationalization:
	langinfo.h - locale info functions
	locale.h/xlocale.h - setlocale, localeconv, etc.
	iconv.h - character set conversion
	libintl.h - gettext functions
	stdlib.h - rpmatch() - response match