summaryrefslogtreecommitdiff
path: root/ext/socket/ancdata.c
AgeCommit message (Collapse)Author
2011-08-15* ext/socket: Make Socket documentation appear. Add documentation fordrbrain
Socket, TCPServer, SOCKSSocket. Patch by Sylvain Daubert. [Ruby 1.9 - Feature #5182] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23* ext/socket/extconf.rb: test recvmsg allocates file descriptors forakr
fd passing even with MSG_PEEK. * ext/socket/ancdata.c: use the above test result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23* io.c (rb_update_max_fd): validate fd.akr
* ext/socket/rubysocket.h (rsock_discard_cmsg_resource): add msg_peek_p argument for the declaration. * ext/socket/ancdata.c (discard_cmsg): add msg_peek_p argument. assume FreeBSD, NetBSD and MacOS X doesn't generate passed fd when MSG_PEEK. (rsock_discard_cmsg_resource): add msg_peek_p argument. (bsock_recvmsg_internal): call rsock_discard_cmsg_resource with msg_peek_p argument. * ext/socket/unixsocket.c (unix_recv_io): call rsock_discard_cmsg_resource with msg_peek_p argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-21* ext/socket/ancdata.c (discard_cmsg): workaround for MacOS X Lion.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-20* include/ruby/intern.h (rb_update_max_fd): declaration moved fromakr
internal.h. * file.c: ditto. * io.c: call rb_update_max_fd for each new fds. * process.c: ditto. * random.c: ditto. * ruby.c: ditto. * ext/io/console/console.c: ditto. * ext/openssl/ossl_bio.c: ditto. * ext/pty/pty.c: ditto. * ext/socket/init.c: ditto. * ext/socket/socket.c: ditto. * ext/socket/ancdata.c: ditto. * ext/socket/unixsocket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-23update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-11* fix type warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19* ext/socket/ancdata.c (ancillary_timestamp): fix a constant type.akr
* ext/socket/raddrinfo.c (get_afamily): suppress a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-21* suppress warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-04* ext/socket/option.c (sockopt_inspect): use rb_str_cat2 andakr
rb_str_append. * ext/socket/ancdata.c (ancillary_inspect): refined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-04* ext/socket/ancdata.c (ancillary_inspect): use rb_str_cat2 andakr
rb_str_append. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-28* ext/socket: fixed types.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-28* ext/socket/rubysocket.h: non-implemented method definitions neednobu
to be shared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22* ext/**/*.[ch]: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-22* ext/socket: use rsock_ prefix for internal initialization functions.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-22update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-21* ext/socket: make sources rdoc friendly.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-30* ext/socket/extconf.rb: use have_struct_member.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-04fix typos.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-07update comment.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-01rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-01* include/ruby/intern.h (rb_time_num_new): declared.akr
* time.c (nsec2timev): extracted from time_new_internal. (time_new_internal): change argument to VALUE. (rb_time_new): follow the argument change. (rb_time_nano_new): ditto. (rb_time_num_new): new function. * ext/socket/ancdata.c (ancillary_timestamp): use rb_time_num_new to represent struct bintime preciously. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-18* ext/readline/readline.c: use rb_f_notimplement for methods notakr
implemented. * ext/openssl/ossl_engine.c: ditto. * ext/openssl/ossl_config.c: ditto. * ext/openssl/ossl_cipher.c: ditto. * ext/openssl/ossl_pkcs5.c: ditto. * ext/openssl/ossl_x509ext.c: ditto. * ext/socket/socket.c: ditto. * ext/socket/basicsocket.c: ditto. * ext/socket/ancdata.c: ditto. * ext/socket/unixsocket.c: ditto. * ext/iconv/iconv.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-19* io.c (rb_mWaitReadable): defined.akr
(rb_mWaitWritable): defined. (io_getpartial): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rb_io_write_nonblock): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. * error.c (make_errno_exc): extracted from rb_sys_fail. (rb_mod_sys_fail): new function. * include/ruby/ruby.h (rb_mod_sys_fail): declared. (rb_mWaitReadable): declared. (rb_mWaitWritable): declared. * ext/socket/init.c (rsock_s_recvfrom_nonblock): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rsock_s_accept_nonblock): extend IO::WaitReadable on EWOULDBLOCK, EAGAIN, ECONNABORTED and EPROTO. * ext/socket/socket.c (sock_connect_nonblock): extend IO::WaitWritable on EINPROGRESS. * ext/socket/ancdata.c (bsock_sendmsg_internal): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. (bsock_recvmsg_internal): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): raise SSLError extended by IO::WaitReadable/IO::WaitWritable on SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE. * ext/openssl/ossl.c (ossl_make_error): extracted from ossl_raise. (ossl_exc_new): new function. * ext/openssl/ossl.h (ossl_exc_new): declared. * lib/net/protocol.rb (rbuf_fill): rescue IO::WaitReadable and IO::WaitWritable. [ruby-core:22539], [ruby-dev:38140] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-18* ext/socket/ancdata.c: not use pktinfo.ipi_spec_dst if not definedtakano32
* ext/socket/extconf.rb: define HAVE_IPI_SPEC_DST git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02* ext/socket/ancdata.c (anc_inspect_socket_creds): supress warnings.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02* ext/socket/ancdata.c (rsock_discard_cmsg_resource): definedakr
unconditionally. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01* ext/socket/ (rsock_getfamily): renamed from rb_sock_getfamily.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01* ext/socket: add rsock_prefix.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-28* ext/socket/ancdata.c (ancillary_unix_rights): check message type.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-27* ext/socket/ancdata.c (bsock_recvmsg_internal): close FDs passed byakr
SCM_RIGHTS unless :scm_rights=>true is given. (discard_cmsg): extracted from rsock_discard_cmsg_resource. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-26rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25* ext/socket/ancdata.c (ancillary_unix_rights): raiseakr
NotImplementedError if no fd passing feature. (ancillary_timestamp): raise NotImplementedError if no timestamp feature. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25* ext/socket/ancdata.c (ancillary_s_unix_rights): new method.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25* ext/socket/unixsocket.c (unix_recv_io): prevent FD leak when 2 fd isakr
sent on LP64 platform. * ext/socket/rubysocket.h (rsock_discard_cmsg_resource): declared. * ext/socket/ancdata.c (rsock_discard_cmsg_resource): renamed from discard_cmsg_resource. export it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24* ext/socket/ancdata.c (ancillary_timestamp): support SCM_BINTIME.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24* ext/socket/ancdata.c (ancillary_timestamp): new method.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23* ext/socket/ancdata.c (inspect_timespec_as_abstime): new function toakr
show struct timespec. (ancillary_inspect): use it for SCM_TIMESTAMPNS on GNU/Linux. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23* ext/socket/ancdata.c (inspect_bintime_as_abstime): new function toakr
show struct bintime. (ancillary_inspect): use it for SCM_BINTIME on FreeBSD. * ext/socket/mkconstants.rb: define SCM_BINTIME. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23* ext/socket/ancdata.c (inspect_timeval_as_abstime): use time_takr
variable to avoid a warning on environments which use long as tv_sec as NetBSD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22* ext/socket/ancdata.c (ancillary_inspect): use SCM_TIMESTAMP insteadakr
of SO_TIMESTAMP. SCM_TIMESTAMP != SO_TIMESTAMP on MacOS X. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22* ext/socket/ancdata.c (inspect_timeval_as_abstime): new function.akr
(ancillary_inspect): use it for SO_TIMESTAMP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21* ext/socket/ancdata.c (bsock_recvmsg_internal): handle EMSGSIZE asakr
well. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21* ext/socket/ancdata.c (bsock_recvmsg_internal): check max lengthakr
overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21* ext/socket/ancdata.c (bsock_recvmsg_internal): don't callakr
discard_cmsg_resource when EMFILE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21* ext/socket/ancdata.c (bsock_recvmsg_internal): gc when SCM_RIGHTSakr
hit the file descriptor limit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21* io.c (io_getpartial): error message describes what should beakr
waited after nonblocking error. (rb_io_write_nonblock): ditto. * ext/socket/init.c (s_recvfrom_nonblock): ditto. (s_accept_nonblock): ditto. * ext/socket/socket.c (sock_connect_nonblock): ditto. * ext/socket/ancdata.c (bsock_sendmsg_internal): ditto. (bsock_recvmsg_internal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21* ext/socket/ancdata.c (bsock_recvmsg_internal): check recvmsg errorakr
earlier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e