]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Added sk_send_buffer_empty().
authorMartin Mares <mj@ucw.cz>
Mon, 31 May 1999 13:21:07 +0000 (13:21 +0000)
committerMartin Mares <mj@ucw.cz>
Mon, 31 May 1999 13:21:07 +0000 (13:21 +0000)
lib/socket.h

index bb9c1c3d065fdc3f3078f9ecdcbab1a9ad6cd8f8..e6229f70e854fdab4910c5c8c1094ff27b10956e 100644 (file)
@@ -46,6 +46,12 @@ int sk_send(sock *, unsigned len);   /* Send data, <0=err, >0=ok, 0=sleep */
 int sk_send_to(sock *, unsigned len, ip_addr to, unsigned port); /* sk_send to given destination */
 void sk_dump_all(void);
 
+static inline int
+sk_send_buffer_empty(sock *sk)
+{
+       return sk->tbuf == sk->tpos;
+}
+
 /*
  *     Socket types                 SA SP DA DP IF  TTL SendTo (?=may, -=must not, *=must)
  */