Configure E1 pcap file per line

In order to allow configuration of pcap files per e1_line
the vty command is now (for example line 0):

  e1_line 0 pcap /tmp/e1cap.pcap

in place of:

  pcap /tmp/e1cap.pcap

Also ensures that a configured pcap appears in 'show running-config'
and is written to the config file on issuing 'write'

This commit deprecates e1_set_pcap_fd()

Change-Id: I316c3d6a839e84c2f52a148c6b8dd6f5933cf4bf
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h
index 9b99f12..9c3fe56 100644
--- a/include/osmocom/abis/e1_input.h
+++ b/include/osmocom/abis/e1_input.h
@@ -223,6 +223,10 @@
 	void *driver_data;
 
 	struct osmo_use_count use_count;
+
+	/* file name and file descriptor of pcap for this line */
+	char *pcap_file;
+	int pcap_fd;
 };
 #define e1inp_line_ipa_oml_ts(line) (&line->ts[0])
 #define e1inp_line_ipa_rsl_ts(line, trx_id) (&line->ts[1 + (trx_id)])
@@ -317,8 +321,11 @@
         void *rx_cbdata);
 
 /* Write LAPD frames to the fd. */
+OSMO_DEPRECATED("Use e1_set_pcap_fd2() instead")
 int e1_set_pcap_fd(int fd);
 
+int e1_set_pcap_fd2(struct e1inp_line *line, int fd);
+
 /* called by TRAU muxer to obtain the destination mux entity */
 struct subch_mux *e1inp_get_mux(uint8_t e1_nr, uint8_t ts_nr);