#include "git-compat-util.h"
#include "copy.h"
#include "pkt-line.h"
#include "gettext.h"
#include "hex.h"
#include "run-command.h"
#include "sideband.h"
#include "trace.h"
#include "write-or-die.h"
char packet_buffer[LARGE_PACKET_MAX];
static const char *packet_trace_prefix = …;
static struct trace_key trace_packet = …;
static struct trace_key trace_pack = …;
void packet_trace_identity(const char *prog)
{ … }
static const char *get_trace_prefix(void)
{ … }
static int packet_trace_pack(const char *buf, unsigned int len, int sideband)
{ … }
static void packet_trace(const char *buf, unsigned int len, int write)
{ … }
void packet_flush(int fd)
{ … }
void packet_delim(int fd)
{ … }
void packet_response_end(int fd)
{ … }
int packet_flush_gently(int fd)
{ … }
void packet_buf_flush(struct strbuf *buf)
{ … }
void packet_buf_delim(struct strbuf *buf)
{ … }
void set_packet_header(char *buf, int size)
{ … }
static void format_packet(struct strbuf *out, const char *prefix,
const char *fmt, va_list args)
{ … }
static int packet_write_fmt_1(int fd, int gently, const char *prefix,
const char *fmt, va_list args)
{ … }
void packet_write_fmt(int fd, const char *fmt, ...)
{ … }
int packet_write_fmt_gently(int fd, const char *fmt, ...)
{ … }
static int do_packet_write(const int fd_out, const char *buf, size_t size,
struct strbuf *err)
{ … }
static int packet_write_gently(const int fd_out, const char *buf, size_t size)
{ … }
void packet_write(int fd_out, const char *buf, size_t size)
{ … }
void packet_fwrite(FILE *f, const char *buf, size_t size)
{ … }
void packet_fwrite_fmt(FILE *fh, const char *fmt, ...)
{ … }
void packet_fflush(FILE *f)
{ … }
void packet_buf_write(struct strbuf *buf, const char *fmt, ...)
{ … }
int write_packetized_from_fd_no_flush(int fd_in, int fd_out)
{ … }
int write_packetized_from_buf_no_flush_count(const char *src_in, size_t len,
int fd_out, int *packet_counter)
{ … }
static int get_packet_data(int fd, char **src_buf, size_t *src_size,
void *dst, unsigned size, int options)
{ … }
int packet_length(const char lenbuf_hex[4], size_t size)
{ … }
static char *find_packfile_uri_path(const char *buffer)
{ … }
enum packet_read_status packet_read_with_status(int fd, char **src_buffer,
size_t *src_len, char *buffer,
unsigned size, int *pktlen,
int options)
{ … }
int packet_read(int fd, char *buffer, unsigned size, int options)
{ … }
char *packet_read_line(int fd, int *dst_len)
{ … }
int packet_read_line_gently(int fd, int *dst_len, char **dst_line)
{ … }
ssize_t read_packetized_to_strbuf(int fd_in, struct strbuf *sb_out, int options)
{ … }
int recv_sideband(const char *me, int in_stream, int out)
{ … }
void packet_reader_init(struct packet_reader *reader, int fd,
char *src_buffer, size_t src_len,
int options)
{ … }
enum packet_read_status packet_reader_read(struct packet_reader *reader)
{ … }
enum packet_read_status packet_reader_peek(struct packet_reader *reader)
{ … }
void packet_writer_init(struct packet_writer *writer, int dest_fd)
{ … }
void packet_writer_write(struct packet_writer *writer, const char *fmt, ...)
{ … }
void packet_writer_error(struct packet_writer *writer, const char *fmt, ...)
{ … }
void packet_writer_delim(struct packet_writer *writer)
{ … }
void packet_writer_flush(struct packet_writer *writer)
{ … }